{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Imports\n",
    "\n",
    "Import all the modules and functionalities we need."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# Import standard libraries.\n",
    "import os\n",
    "\n",
    "# Import third party libraries.\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "from statsmodels.stats.multitest import multipletests\n",
    "\n",
    "# Import custom libraries/scripts.\n",
    "import annotations\n",
    "import helpers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Loading data\n",
    "\n",
    "Fetch all our relevant data for the current analysis."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "#EXPERIMENTS_PATH = r'D:\\Miguel\\PhD\\Results\\Competition\\DL\\Four-Arena Setup\\WT_mating_status\\processed'\n",
    "EXPERIMENTS_PATH = r'\\\\10.40.12.80\\home\\PhD\\Results\\Competition\\DL\\Four-Arena Setup\\WT_mating_status\\processed'\n",
    "FPS = 60\n",
    "N_MINUTES = 60\n",
    "N_FRAMES = N_MINUTES * 60 * FPS\n",
    "INK = 'black'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "sns.set(\n",
    "        context='talk',\n",
    "        style='ticks',\n",
    "        font='sans-serif',\n",
    "        font_scale=1.0, \n",
    "        rc={\n",
    "            'axes.axisbelow': True,\n",
    "            'axes.edgecolor': INK,\n",
    "            'axes.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'axes.grid': False,\n",
    "            'axes.labelcolor': INK,\n",
    "            'axes.labelsize': 13.0,\n",
    "            'axes.labelweight': 'normal',\n",
    "            'axes.linewidth': 1.2,\n",
    "            'axes.spines.left': True,\n",
    "            'axes.spines.bottom': True,\n",
    "            'axes.spines.top': False,\n",
    "            'axes.spines.right': False,\n",
    "            'axes.titlepad': 15.0,\n",
    "            'axes.titlesize': 20.0,\n",
    "            'axes.titleweight': 'bold',\n",
    "            'figure.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'figure.figsize': [6.0, 4.0],\n",
    "            'figure.titlesize': 18.0,\n",
    "            'figure.titleweight': 'bold',\n",
    "            'font.family': ['sans-serif'],\n",
    "            'font.sans-serif': ['Arial'],\n",
    "            'legend.frameon': False,\n",
    "            'legend.fontsize': 11.0,\n",
    "            'lines.color': INK,\n",
    "            'lines.linewidth': 1.0,\n",
    "            'patch.edgecolor': INK,\n",
    "            'patch.linewidth': 1.0,\n",
    "            'savefig.dpi': 300,\n",
    "            'savefig.format': 'png',\n",
    "            'savefig.bbox': 'tight',\n",
    "            'savefig.transparent': True,\n",
    "            'text.color': INK,\n",
    "            'text.usetex': False,\n",
    "            'xtick.color': INK,\n",
    "            'xtick.direction': 'out',\n",
    "            'xtick.labelsize': 12.0,\n",
    "            'xtick.major.pad': 5.0,\n",
    "            'xtick.major.size': 0.0,\n",
    "            'xtick.major.width': 1.0,\n",
    "            'xtick.minor.size': 0.0,\n",
    "            'xtick.minor.width': 0.4,\n",
    "            'ytick.color': INK,\n",
    "            'ytick.direction': 'out',\n",
    "            'ytick.labelsize': 12.0,\n",
    "            'ytick.major.pad': 5.0,\n",
    "            'ytick.major.size': 3.0,\n",
    "            'ytick.major.width': 1.2,\n",
    "            'ytick.minor.size': 0.0,\n",
    "            'ytick.minor.width': 0.4\n",
    "           }\n",
    "       )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Folder already exists, skipping.\n"
     ]
    }
   ],
   "source": [
    "# Prepare the Figures folder for the selected condition.\n",
    "savepath = os.path.join(r'C:\\Users\\Miguel\\Desktop\\paper_data', 'paper_figures', 'figure1')\n",
    "try:\n",
    "    os.makedirs(savepath)\n",
    "    print('New folder created.')\n",
    "except FileExistsError:\n",
    "    print('Folder already exists, skipping.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Paths to conditions:\n",
      " ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin']\n"
     ]
    }
   ],
   "source": [
    "condition_order = ['virgin_virgin', 'virgin_mated24h', 'virgin_mated2h']\n",
    "conditions = [item.path for item in os.scandir(EXPERIMENTS_PATH) if item.name in condition_order]\n",
    "print('Paths to conditions:\\n', conditions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['video_2017-09-05T14_34_55_arena4', 'video_2017-09-12T14_36_55_arena4', 'video_2017-09-14T13_34_41_arena2', 'video_2017-09-21T14_47_10_arena3', 'video_2017-09-21T14_47_10_arena4', 'video_2017-09-26T13_40_19_arena4', 'video_2017-09-27T16_21_07_arena1', 'video_2017-09-27T16_21_07_arena3', 'video_2017-09-28T15_55_49_arena2', 'video_2017-10-12T14_34_41_arena2', 'video_2017-10-18T14_05_05_arena3', 'video_2017-10-19T14_58_20_arena1', 'video_2017-10-24T14_48_34_arena1', 'video_2017-10-24T14_48_34_arena4', 'video_2017-10-25T13_39_35_arena4', 'video_2017-11-03T14_54_45_arena2', 'video_2017-09-05T15_42_04_arena1', 'video_2017-11-02T16_11_06_arena1', 'video_2017-12-19T16_23_33_arena4', 'video_2017-09-05T15_42_04_arena3', 'video_2017-09-07T13_28_02_arena4']\n",
      "21\n"
     ]
    }
   ],
   "source": [
    "# Create a list of all the experiments that we DO NOT want to analyze, for various reasons.\n",
    "intruders = []\n",
    "for condition in conditions:\n",
    "    for file in os.listdir(condition):\n",
    "        if 'quality_control' in file:\n",
    "\n",
    "            # Read the quality.csv file to check which experiments are usable for analysis.\n",
    "            quality_file = os.path.join(condition, file)\n",
    "            quality_df = pd.read_csv(quality_file, usecols=[0,1], index_col=0)\n",
    "            quality_df = quality_df[quality_df['is_usable'] == False].index.values\n",
    "\n",
    "            for value in quality_df:\n",
    "                intruders.append(value)\n",
    "\n",
    "print(intruders)             \n",
    "print(len(intruders))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\t\n",
      " virgin_mated24h\n",
      "Copulation too short: video_2017-09-20T14_48_55_arena3\n",
      "\t\n",
      " virgin_mated2h\n",
      "\t\n",
      " virgin_virgin\n",
      "Copulation too short: video_2017-09-06T13_42_13_arena3\n",
      "Copulation too short: video_2017-09-26T14_52_18_arena3\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_virgin': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T13_28_41_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T14_34_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T13_42_13_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T14_45_32_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-08T13_26_13_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T13_30_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T14_36_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T16_18_15_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-13T14_34_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T13_43_53_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T14_48_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T13_38_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T15_57_23_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-26T13_40_19_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T13_36_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T14_44_01_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T15_55_49_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-12T15_50_43_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-13T16_06_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-18T15_19_17_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-19T13_50_56_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T13_21_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T15_44_09_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-24T16_13_35_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-25T14_55_12_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T13_37_48_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T14_48_28_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T16_11_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T14_54_45_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T16_20_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T12_58_51_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T14_01_01_arena3'],\n",
       " 'virgin_mated24h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-05T13_28_41_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-07T16_01_26_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-12T13_30_06_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-13T15_40_03_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-14T14_47_16_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-20T13_43_53_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-26T14_52_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-27T15_06_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T13_30_05_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T16_00_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T13_50_56_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T14_58_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T16_19_37_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-24T13_43_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T13_39_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T13_35_36_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T14_43_16_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T16_20_50_arena3'],\n",
       " 'virgin_mated2h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-06T15_53_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-13T15_40_03_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-14T15_53_40_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-20T16_07_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-28T15_55_49_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-12T15_50_43_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-13T16_06_33_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-11-02T16_11_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-20T15_08_53_arena2']}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "experiments = {condition: [] for condition in condition_order}\n",
    "\n",
    "for condition_path in conditions:\n",
    "    \n",
    "    condition = os.path.basename(condition_path)\n",
    "    print('\\t\\n', condition)\n",
    "    \n",
    "    for item in os.scandir(condition_path):\n",
    "        if item.is_dir() and item.name not in intruders:\n",
    "            \n",
    "            annotation_video = annotations.read(item.path + '.csv')\n",
    "            \n",
    "            try:\n",
    "                copulation = annotation_video[0].events[0]\n",
    "\n",
    "                # Filter out videos where copulation is interrupted.\n",
    "                copulation_end = copulation.time_interval[1]\n",
    "                if copulation_end==N_FRAMES:\n",
    "                    print('Copulation interrupted:', item.name)\n",
    "                    continue\n",
    "\n",
    "                # Filter out videos where copulation lasts less than 8 minutes.\n",
    "                copulation_duration = copulation.duration\n",
    "                if copulation_duration <= 8 * 60 * FPS:\n",
    "                    print('Copulation too short:', item.name)\n",
    "                    continue\n",
    "            \n",
    "            except IndexError:\n",
    "                continue\n",
    "            \n",
    "            experiments[condition].append(item.path)\n",
    "\n",
    "experiments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Get distance walked per frame (in mm) from the start of each video until the end of copulation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "virgin_virgin\n",
      "video_2017-09-05T13_28_41_arena4\n",
      "video_2017-09-05T14_34_55_arena2\n",
      "video_2017-09-06T13_42_13_arena1\n",
      "video_2017-09-06T14_45_32_arena3\n",
      "video_2017-09-07T14_37_38_arena3\n",
      "video_2017-09-07T14_37_38_arena4\n",
      "video_2017-09-08T13_26_13_arena3\n",
      "video_2017-09-12T13_30_06_arena4\n",
      "video_2017-09-12T14_36_55_arena3\n",
      "video_2017-09-12T16_18_15_arena4\n",
      "video_2017-09-13T14_34_18_arena2\n",
      "video_2017-09-20T13_43_53_arena3\n",
      "video_2017-09-20T14_48_55_arena2\n",
      "video_2017-09-21T13_38_55_arena4\n",
      "video_2017-09-21T15_57_23_arena2\n",
      "video_2017-09-26T13_40_19_arena1\n",
      "video_2017-09-28T13_36_06_arena4\n",
      "video_2017-09-28T14_44_01_arena3\n",
      "video_2017-09-28T15_55_49_arena3\n",
      "video_2017-10-12T15_50_43_arena2\n",
      "video_2017-10-13T16_06_33_arena2\n",
      "video_2017-10-18T15_19_17_arena3\n",
      "video_2017-10-19T13_50_56_arena2\n",
      "video_2017-10-20T13_21_06_arena2\n",
      "video_2017-10-20T15_44_09_arena2\n",
      "video_2017-10-24T16_13_35_arena4\n",
      "video_2017-10-25T14_55_12_arena1\n",
      "video_2017-11-02T13_37_48_arena3\n",
      "video_2017-11-02T14_48_28_arena4\n",
      "video_2017-11-02T16_11_06_arena3\n",
      "video_2017-11-03T14_54_45_arena1\n",
      "video_2017-11-03T16_20_50_arena4\n",
      "video_2017-12-20T12_58_51_arena4\n",
      "video_2017-12-20T14_01_01_arena3\n",
      "virgin_mated24h\n",
      "video_2017-09-05T13_28_41_arena3\n",
      "video_2017-09-07T16_01_26_arena4\n",
      "video_2017-09-08T14_31_59_arena2\n",
      "video_2017-09-08T14_31_59_arena3\n",
      "video_2017-09-12T13_30_06_arena1\n",
      "video_2017-09-13T15_40_03_arena1\n",
      "video_2017-09-14T14_47_16_arena4\n",
      "video_2017-09-20T13_43_53_arena1\n",
      "video_2017-09-26T14_52_18_arena2\n",
      "video_2017-09-27T15_06_20_arena3\n",
      "video_2017-10-11T13_30_05_arena1\n",
      "video_2017-10-11T16_00_50_arena4\n",
      "video_2017-10-13T14_37_35_arena1\n",
      "video_2017-10-13T14_37_35_arena2\n",
      "video_2017-10-13T14_37_35_arena3\n",
      "video_2017-10-19T13_50_56_arena4\n",
      "video_2017-10-19T14_58_20_arena3\n",
      "video_2017-10-19T16_19_37_arena2\n",
      "video_2017-10-20T14_31_24_arena3\n",
      "video_2017-10-20T14_31_24_arena4\n",
      "video_2017-10-24T13_43_26_arena3\n",
      "video_2017-10-25T13_39_35_arena1\n",
      "video_2017-10-25T14_55_12_arena2\n",
      "video_2017-10-25T14_55_12_arena3\n",
      "video_2017-10-26T13_35_36_arena2\n",
      "video_2017-10-26T14_43_16_arena3\n",
      "video_2017-11-03T13_38_06_arena2\n",
      "video_2017-11-03T13_38_06_arena3\n",
      "video_2017-11-03T13_38_06_arena4\n",
      "video_2017-11-03T16_20_50_arena3\n",
      "virgin_mated2h\n",
      "video_2017-09-06T15_53_34_arena1\n",
      "video_2017-09-07T16_01_26_arena1\n",
      "video_2017-09-07T16_01_26_arena2\n",
      "video_2017-09-08T15_42_18_arena1\n",
      "video_2017-09-08T15_42_18_arena3\n",
      "video_2017-09-13T15_40_03_arena4\n",
      "video_2017-09-14T15_53_40_arena3\n",
      "video_2017-09-20T16_07_55_arena4\n",
      "video_2017-09-21T15_57_23_arena1\n",
      "video_2017-09-21T15_57_23_arena4\n",
      "video_2017-09-26T16_06_31_arena1\n",
      "video_2017-09-26T16_06_31_arena3\n",
      "video_2017-09-28T15_55_49_arena1\n",
      "video_2017-10-11T16_00_50_arena1\n",
      "video_2017-10-11T16_00_50_arena2\n",
      "video_2017-10-11T16_00_50_arena3\n",
      "video_2017-10-12T15_50_43_arena4\n",
      "video_2017-10-13T16_06_33_arena4\n",
      "video_2017-10-18T16_37_02_arena3\n",
      "video_2017-10-18T16_37_02_arena4\n",
      "video_2017-10-19T16_19_37_arena1\n",
      "video_2017-10-19T16_19_37_arena4\n",
      "video_2017-10-25T16_23_26_arena1\n",
      "video_2017-10-25T16_23_26_arena3\n",
      "video_2017-11-02T16_11_06_arena4\n",
      "video_2017-12-19T15_13_55_arena2\n",
      "video_2017-12-19T15_13_55_arena3\n",
      "video_2017-12-19T16_23_33_arena1\n",
      "video_2017-12-19T16_23_33_arena2\n",
      "video_2017-12-19T16_23_33_arena3\n",
      "video_2017-12-20T15_08_53_arena2\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pos_x</th>\n",
       "      <th>pos_y</th>\n",
       "      <th>vel</th>\n",
       "      <th>copulation</th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "      <th>has_aggression</th>\n",
       "      <th>dist_walked_mm</th>\n",
       "      <th>dist_walked_meters</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>161.99</td>\n",
       "      <td>86.105</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>before</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>True</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>161.99</td>\n",
       "      <td>86.105</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>before</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>True</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>161.99</td>\n",
       "      <td>86.105</td>\n",
       "      <td>0.19732</td>\n",
       "      <td>before</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>True</td>\n",
       "      <td>0.003289</td>\n",
       "      <td>0.000003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>161.92</td>\n",
       "      <td>86.194</td>\n",
       "      <td>0.64946</td>\n",
       "      <td>before</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>True</td>\n",
       "      <td>0.010824</td>\n",
       "      <td>0.000011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>161.71</td>\n",
       "      <td>86.145</td>\n",
       "      <td>1.97140</td>\n",
       "      <td>before</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>True</td>\n",
       "      <td>0.032857</td>\n",
       "      <td>0.000033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100458</th>\n",
       "      <td>173.69</td>\n",
       "      <td>103.980</td>\n",
       "      <td>2.62200</td>\n",
       "      <td>during</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>True</td>\n",
       "      <td>0.043700</td>\n",
       "      <td>0.000044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100459</th>\n",
       "      <td>173.45</td>\n",
       "      <td>103.860</td>\n",
       "      <td>1.80180</td>\n",
       "      <td>during</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>True</td>\n",
       "      <td>0.030030</td>\n",
       "      <td>0.000030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100460</th>\n",
       "      <td>173.35</td>\n",
       "      <td>103.590</td>\n",
       "      <td>1.65710</td>\n",
       "      <td>during</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>True</td>\n",
       "      <td>0.027618</td>\n",
       "      <td>0.000028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100461</th>\n",
       "      <td>173.34</td>\n",
       "      <td>103.380</td>\n",
       "      <td>1.81800</td>\n",
       "      <td>during</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>True</td>\n",
       "      <td>0.030300</td>\n",
       "      <td>0.000030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100462</th>\n",
       "      <td>173.27</td>\n",
       "      <td>103.020</td>\n",
       "      <td>1.50940</td>\n",
       "      <td>during</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>True</td>\n",
       "      <td>0.025157</td>\n",
       "      <td>0.000025</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8275032 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         pos_x    pos_y      vel copulation       condition  \\\n",
       "0       161.99   86.105  0.00000     before   virgin_virgin   \n",
       "1       161.99   86.105  0.00000     before   virgin_virgin   \n",
       "2       161.99   86.105  0.19732     before   virgin_virgin   \n",
       "3       161.92   86.194  0.64946     before   virgin_virgin   \n",
       "4       161.71   86.145  1.97140     before   virgin_virgin   \n",
       "...        ...      ...      ...        ...             ...   \n",
       "100458  173.69  103.980  2.62200     during  virgin_mated2h   \n",
       "100459  173.45  103.860  1.80180     during  virgin_mated2h   \n",
       "100460  173.35  103.590  1.65710     during  virgin_mated2h   \n",
       "100461  173.34  103.380  1.81800     during  virgin_mated2h   \n",
       "100462  173.27  103.020  1.50940     during  virgin_mated2h   \n",
       "\n",
       "                              experiment  has_aggression  dist_walked_mm  \\\n",
       "0       video_2017-09-05T13_28_41_arena4            True        0.000000   \n",
       "1       video_2017-09-05T13_28_41_arena4            True        0.000000   \n",
       "2       video_2017-09-05T13_28_41_arena4            True        0.003289   \n",
       "3       video_2017-09-05T13_28_41_arena4            True        0.010824   \n",
       "4       video_2017-09-05T13_28_41_arena4            True        0.032857   \n",
       "...                                  ...             ...             ...   \n",
       "100458  video_2017-12-20T15_08_53_arena2            True        0.043700   \n",
       "100459  video_2017-12-20T15_08_53_arena2            True        0.030030   \n",
       "100460  video_2017-12-20T15_08_53_arena2            True        0.027618   \n",
       "100461  video_2017-12-20T15_08_53_arena2            True        0.030300   \n",
       "100462  video_2017-12-20T15_08_53_arena2            True        0.025157   \n",
       "\n",
       "        dist_walked_meters  \n",
       "0                 0.000000  \n",
       "1                 0.000000  \n",
       "2                 0.000003  \n",
       "3                 0.000011  \n",
       "4                 0.000033  \n",
       "...                    ...  \n",
       "100458            0.000044  \n",
       "100459            0.000030  \n",
       "100460            0.000028  \n",
       "100461            0.000030  \n",
       "100462            0.000025  \n",
       "\n",
       "[8275032 rows x 9 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "total_distance = []\n",
    "distance_during_copulation = {condition: {} for condition in condition_order}\n",
    "distance_before_copulation = {condition: {} for condition in condition_order}\n",
    "distance_df = pd.DataFrame()\n",
    "\n",
    "# Set features to extract from trackfeat files.\n",
    "features = ['pos x', 'pos y', 'vel']\n",
    "\n",
    "for condition in condition_order:\n",
    "    \n",
    "    print(condition)\n",
    "    \n",
    "    for experiment_path in experiments[condition]:\n",
    "        \n",
    "        control = True if condition == 'virgin_virgin' else False\n",
    "\n",
    "        aggression_df, mating_df, copulation_time, aggression_timepoints = helpers.process_track_data(experiment_path,\n",
    "                                                                                                      include_aggression_only=False,\n",
    "                                                                                                      fly_id=2,\n",
    "                                                                                                      is_control=control,\n",
    "                                                                                                      trackfeat_columns=features,\n",
    "                                                                                                      suppress=True\n",
    "                                                                                                     )\n",
    "        if aggression_df is None or mating_df is None:\n",
    "            continue\n",
    "\n",
    "        experiment = os.path.basename(experiment_path)\n",
    "        \n",
    "        print(experiment)\n",
    "\n",
    "        # Slice the aggressive female's data only up until end of copulation - we do not care about what happens after that.\n",
    "        copulation_start = copulation_time[0]\n",
    "        copulation_end = copulation_time[1]\n",
    "        aggression_slice = aggression_df.loc[:copulation_end-1, :].copy()\n",
    "        aggression_slice.fillna(method='ffill', inplace=True)\n",
    "        aggression_slice = aggression_slice[aggression_slice['vel'] < 20]  # Filter out jumps.\n",
    "\n",
    "        # Categorize frames from before copulation or duting copulation so we can later compare these two moments.\n",
    "        aggression_slice['copulation'] = aggression_slice.index < copulation_start\n",
    "        aggression_slice['copulation'] = aggression_slice['copulation'].map({True: 'before', False: 'during'})\n",
    "        aggression_slice['condition'] = condition\n",
    "        aggression_slice['experiment'] = experiment\n",
    "        aggression_slice['has_aggression'] = True if len(aggression_timepoints) > 0 else False\n",
    "\n",
    "        aggression_during_copulation = aggression_df.loc[copulation_start:copulation_end-1, :].copy()\n",
    "        aggression_during_copulation.fillna(method='ffill', inplace=True)\n",
    "        aggression_before_copulation = aggression_df.loc[:copulation_start-1, :].copy()\n",
    "        aggression_before_copulation.fillna(method='ffill', inplace=True)\n",
    "\n",
    "        # Calculate distance walked per frame based on the velocity column.\n",
    "        aggression_slice['dist_walked_mm'] = (aggression_slice['vel'] / 60)\n",
    "        aggression_slice['dist_walked_meters'] = (aggression_slice['vel'] / 60 / 1000)\n",
    "        aggression_during_copulation['dist_walked_mm'] = (aggression_during_copulation['vel'] / 60)\n",
    "        aggression_before_copulation['dist_walked_mm'] = (aggression_before_copulation['vel'] / 60)\n",
    "        \n",
    "        total_distance.append(sum(aggression_slice['dist_walked_mm']))\n",
    "        distance_during_copulation[condition][experiment] = sum(aggression_during_copulation['dist_walked_mm'])\n",
    "        distance_before_copulation[condition][experiment] = sum(aggression_before_copulation['dist_walked_mm'])\n",
    "\n",
    "        distance_df = pd.concat([distance_df, aggression_slice], axis=0)\n",
    "\n",
    "distance_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "      <th>pos_x</th>\n",
       "      <th>pos_y</th>\n",
       "      <th>vel</th>\n",
       "      <th>has_aggression</th>\n",
       "      <th>dist_walked_mm</th>\n",
       "      <th>dist_walked_meters</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena3</td>\n",
       "      <td>1.536981e+07</td>\n",
       "      <td>1.684179e+07</td>\n",
       "      <td>565503.122424</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9425.052040</td>\n",
       "      <td>9.425052</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-07T16_01_26_arena4</td>\n",
       "      <td>1.569941e+07</td>\n",
       "      <td>1.569519e+07</td>\n",
       "      <td>454586.350065</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7576.439168</td>\n",
       "      <td>7.576439</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-08T14_31_59_arena2</td>\n",
       "      <td>1.199031e+07</td>\n",
       "      <td>1.093266e+07</td>\n",
       "      <td>354113.452806</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5901.890880</td>\n",
       "      <td>5.901891</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-08T14_31_59_arena3</td>\n",
       "      <td>1.111254e+07</td>\n",
       "      <td>1.272907e+07</td>\n",
       "      <td>315779.688209</td>\n",
       "      <td>59403.0</td>\n",
       "      <td>5262.994803</td>\n",
       "      <td>5.262995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-12T13_30_06_arena1</td>\n",
       "      <td>2.182715e+07</td>\n",
       "      <td>2.181400e+07</td>\n",
       "      <td>776363.427397</td>\n",
       "      <td>113256.0</td>\n",
       "      <td>12939.390457</td>\n",
       "      <td>12.939390</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-02T16_11_06_arena3</td>\n",
       "      <td>1.680257e+07</td>\n",
       "      <td>1.717971e+07</td>\n",
       "      <td>474072.728796</td>\n",
       "      <td>84193.0</td>\n",
       "      <td>7901.212147</td>\n",
       "      <td>7.901212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-03T14_54_45_arena1</td>\n",
       "      <td>8.567400e+06</td>\n",
       "      <td>9.095781e+06</td>\n",
       "      <td>326104.065283</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5435.067755</td>\n",
       "      <td>5.435068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-03T16_20_50_arena4</td>\n",
       "      <td>1.998000e+07</td>\n",
       "      <td>2.036970e+07</td>\n",
       "      <td>710729.939317</td>\n",
       "      <td>101285.0</td>\n",
       "      <td>11845.498989</td>\n",
       "      <td>11.845499</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-12-20T12_58_51_arena4</td>\n",
       "      <td>1.901919e+07</td>\n",
       "      <td>1.845194e+07</td>\n",
       "      <td>648959.570321</td>\n",
       "      <td>94206.0</td>\n",
       "      <td>10815.992839</td>\n",
       "      <td>10.815993</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-12-20T14_01_01_arena3</td>\n",
       "      <td>1.261258e+07</td>\n",
       "      <td>1.817302e+07</td>\n",
       "      <td>419533.919242</td>\n",
       "      <td>86033.0</td>\n",
       "      <td>6992.231987</td>\n",
       "      <td>6.992232</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>95 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          condition                        experiment         pos_x  \\\n",
       "0   virgin_mated24h  video_2017-09-05T13_28_41_arena3  1.536981e+07   \n",
       "1   virgin_mated24h  video_2017-09-07T16_01_26_arena4  1.569941e+07   \n",
       "2   virgin_mated24h  video_2017-09-08T14_31_59_arena2  1.199031e+07   \n",
       "3   virgin_mated24h  video_2017-09-08T14_31_59_arena3  1.111254e+07   \n",
       "4   virgin_mated24h  video_2017-09-12T13_30_06_arena1  2.182715e+07   \n",
       "..              ...                               ...           ...   \n",
       "90    virgin_virgin  video_2017-11-02T16_11_06_arena3  1.680257e+07   \n",
       "91    virgin_virgin  video_2017-11-03T14_54_45_arena1  8.567400e+06   \n",
       "92    virgin_virgin  video_2017-11-03T16_20_50_arena4  1.998000e+07   \n",
       "93    virgin_virgin  video_2017-12-20T12_58_51_arena4  1.901919e+07   \n",
       "94    virgin_virgin  video_2017-12-20T14_01_01_arena3  1.261258e+07   \n",
       "\n",
       "           pos_y            vel  has_aggression  dist_walked_mm  \\\n",
       "0   1.684179e+07  565503.122424             0.0     9425.052040   \n",
       "1   1.569519e+07  454586.350065             0.0     7576.439168   \n",
       "2   1.093266e+07  354113.452806             0.0     5901.890880   \n",
       "3   1.272907e+07  315779.688209         59403.0     5262.994803   \n",
       "4   2.181400e+07  776363.427397        113256.0    12939.390457   \n",
       "..           ...            ...             ...             ...   \n",
       "90  1.717971e+07  474072.728796         84193.0     7901.212147   \n",
       "91  9.095781e+06  326104.065283             0.0     5435.067755   \n",
       "92  2.036970e+07  710729.939317        101285.0    11845.498989   \n",
       "93  1.845194e+07  648959.570321         94206.0    10815.992839   \n",
       "94  1.817302e+07  419533.919242         86033.0     6992.231987   \n",
       "\n",
       "    dist_walked_meters  \n",
       "0             9.425052  \n",
       "1             7.576439  \n",
       "2             5.901891  \n",
       "3             5.262995  \n",
       "4            12.939390  \n",
       "..                 ...  \n",
       "90            7.901212  \n",
       "91            5.435068  \n",
       "92           11.845499  \n",
       "93           10.815993  \n",
       "94            6.992232  \n",
       "\n",
       "[95 rows x 8 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Sum distance walked during all frames for each video and convert that to meters.\n",
    "experiments_grouped = distance_df.groupby(by=['condition', 'experiment'], as_index=False).sum()\n",
    "experiments_grouped"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Distance Timing Distribution During Copulation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "      <th>has_aggression</th>\n",
       "      <th>dist_walked_meters</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena3</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.467064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-07T16_01_26_arena4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4.489327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-08T14_31_59_arena2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.143162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-08T14_31_59_arena3</td>\n",
       "      <td>50997.0</td>\n",
       "      <td>4.315614</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>video_2017-09-12T13_30_06_arena1</td>\n",
       "      <td>41700.0</td>\n",
       "      <td>4.135404</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>181</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-02T16_11_06_arena3</td>\n",
       "      <td>45399.0</td>\n",
       "      <td>3.733793</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>183</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-03T14_54_45_arena1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3.895512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>185</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-11-03T16_20_50_arena4</td>\n",
       "      <td>60491.0</td>\n",
       "      <td>6.670606</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>187</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-12-20T12_58_51_arena4</td>\n",
       "      <td>38707.0</td>\n",
       "      <td>3.843339</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>189</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-12-20T14_01_01_arena3</td>\n",
       "      <td>37455.0</td>\n",
       "      <td>2.329132</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>95 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           condition                        experiment  has_aggression  \\\n",
       "1    virgin_mated24h  video_2017-09-05T13_28_41_arena3             0.0   \n",
       "3    virgin_mated24h  video_2017-09-07T16_01_26_arena4             0.0   \n",
       "5    virgin_mated24h  video_2017-09-08T14_31_59_arena2             0.0   \n",
       "7    virgin_mated24h  video_2017-09-08T14_31_59_arena3         50997.0   \n",
       "9    virgin_mated24h  video_2017-09-12T13_30_06_arena1         41700.0   \n",
       "..               ...                               ...             ...   \n",
       "181    virgin_virgin  video_2017-11-02T16_11_06_arena3         45399.0   \n",
       "183    virgin_virgin  video_2017-11-03T14_54_45_arena1             0.0   \n",
       "185    virgin_virgin  video_2017-11-03T16_20_50_arena4         60491.0   \n",
       "187    virgin_virgin  video_2017-12-20T12_58_51_arena4         38707.0   \n",
       "189    virgin_virgin  video_2017-12-20T14_01_01_arena3         37455.0   \n",
       "\n",
       "     dist_walked_meters  \n",
       "1              3.467064  \n",
       "3              4.489327  \n",
       "5              5.143162  \n",
       "7              4.315614  \n",
       "9              4.135404  \n",
       "..                  ...  \n",
       "181            3.733793  \n",
       "183            3.895512  \n",
       "185            6.670606  \n",
       "187            3.843339  \n",
       "189            2.329132  \n",
       "\n",
       "[95 rows x 4 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "distance_during_copulation = copulation_grouped.query('copulation==\"during\"').copy()\n",
    "distance_during_copulation = distance_during_copulation[['condition', 'experiment', 'has_aggression', 'dist_walked_meters']]\n",
    "distance_during_copulation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "virgin_virgin\n",
      "video_2017-09-05T13_28_41_arena4\n",
      "video_2017-09-05T14_34_55_arena2\n",
      "video_2017-09-06T13_42_13_arena1\n",
      "video_2017-09-06T14_45_32_arena3\n",
      "video_2017-09-07T14_37_38_arena3\n",
      "video_2017-09-07T14_37_38_arena4\n",
      "video_2017-09-08T13_26_13_arena3\n",
      "video_2017-09-12T13_30_06_arena4\n",
      "video_2017-09-12T14_36_55_arena3\n",
      "video_2017-09-12T16_18_15_arena4\n",
      "video_2017-09-13T14_34_18_arena2\n",
      "video_2017-09-20T13_43_53_arena3\n",
      "video_2017-09-20T14_48_55_arena2\n",
      "video_2017-09-21T13_38_55_arena4\n",
      "video_2017-09-21T15_57_23_arena2\n",
      "video_2017-09-26T13_40_19_arena1\n",
      "video_2017-09-28T13_36_06_arena4\n",
      "video_2017-09-28T14_44_01_arena3\n",
      "video_2017-09-28T15_55_49_arena3\n",
      "video_2017-10-12T15_50_43_arena2\n",
      "video_2017-10-13T16_06_33_arena2\n",
      "video_2017-10-18T15_19_17_arena3\n",
      "video_2017-10-19T13_50_56_arena2\n",
      "video_2017-10-20T13_21_06_arena2\n",
      "video_2017-10-20T15_44_09_arena2\n",
      "video_2017-10-24T16_13_35_arena4\n",
      "video_2017-10-25T14_55_12_arena1\n",
      "video_2017-11-02T13_37_48_arena3\n",
      "video_2017-11-02T14_48_28_arena4\n",
      "video_2017-11-02T16_11_06_arena3\n",
      "video_2017-11-03T14_54_45_arena1\n",
      "video_2017-11-03T16_20_50_arena4\n",
      "video_2017-12-20T12_58_51_arena4\n",
      "video_2017-12-20T14_01_01_arena3\n",
      "virgin_mated24h\n",
      "video_2017-09-05T13_28_41_arena3\n",
      "video_2017-09-07T16_01_26_arena4\n",
      "video_2017-09-08T14_31_59_arena2\n",
      "video_2017-09-08T14_31_59_arena3\n",
      "video_2017-09-12T13_30_06_arena1\n",
      "video_2017-09-13T15_40_03_arena1\n",
      "video_2017-09-14T14_47_16_arena4\n",
      "video_2017-09-20T13_43_53_arena1\n",
      "video_2017-09-26T14_52_18_arena2\n",
      "video_2017-09-27T15_06_20_arena3\n",
      "video_2017-10-11T13_30_05_arena1\n",
      "video_2017-10-11T16_00_50_arena4\n",
      "video_2017-10-13T14_37_35_arena1\n",
      "video_2017-10-13T14_37_35_arena2\n",
      "video_2017-10-13T14_37_35_arena3\n",
      "video_2017-10-19T13_50_56_arena4\n",
      "video_2017-10-19T14_58_20_arena3\n",
      "video_2017-10-19T16_19_37_arena2\n",
      "video_2017-10-20T14_31_24_arena3\n",
      "video_2017-10-20T14_31_24_arena4\n",
      "video_2017-10-24T13_43_26_arena3\n",
      "video_2017-10-25T13_39_35_arena1\n",
      "video_2017-10-25T14_55_12_arena2\n",
      "video_2017-10-25T14_55_12_arena3\n",
      "video_2017-10-26T13_35_36_arena2\n",
      "video_2017-10-26T14_43_16_arena3\n",
      "video_2017-11-03T13_38_06_arena2\n",
      "video_2017-11-03T13_38_06_arena3\n",
      "video_2017-11-03T13_38_06_arena4\n",
      "video_2017-11-03T16_20_50_arena3\n",
      "virgin_mated2h\n",
      "video_2017-09-06T15_53_34_arena1\n",
      "video_2017-09-07T16_01_26_arena1\n",
      "video_2017-09-07T16_01_26_arena2\n",
      "video_2017-09-08T15_42_18_arena1\n",
      "video_2017-09-08T15_42_18_arena3\n",
      "video_2017-09-13T15_40_03_arena4\n",
      "video_2017-09-14T15_53_40_arena3\n",
      "video_2017-09-20T16_07_55_arena4\n",
      "video_2017-09-21T15_57_23_arena1\n",
      "video_2017-09-21T15_57_23_arena4\n",
      "video_2017-09-26T16_06_31_arena1\n",
      "video_2017-09-26T16_06_31_arena3\n",
      "video_2017-09-28T15_55_49_arena1\n",
      "video_2017-10-11T16_00_50_arena1\n",
      "video_2017-10-11T16_00_50_arena2\n",
      "video_2017-10-11T16_00_50_arena3\n",
      "video_2017-10-12T15_50_43_arena4\n",
      "video_2017-10-13T16_06_33_arena4\n",
      "video_2017-10-18T16_37_02_arena3\n",
      "video_2017-10-18T16_37_02_arena4\n",
      "video_2017-10-19T16_19_37_arena1\n",
      "video_2017-10-19T16_19_37_arena4\n",
      "video_2017-10-25T16_23_26_arena1\n",
      "video_2017-10-25T16_23_26_arena3\n",
      "video_2017-11-02T16_11_06_arena4\n",
      "video_2017-12-19T15_13_55_arena2\n",
      "video_2017-12-19T15_13_55_arena3\n",
      "video_2017-12-19T16_23_33_arena1\n",
      "video_2017-12-19T16_23_33_arena2\n",
      "video_2017-12-19T16_23_33_arena3\n",
      "video_2017-12-20T15_08_53_arena2\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_virgin': {'video_2017-09-05T13_28_41_arena4': [0.013299929416666715,\n",
       "   0.13372338547999993,\n",
       "   0.22469855378333353,\n",
       "   0.31410345949999974,\n",
       "   0.33373198601666704,\n",
       "   0.13980933200000037,\n",
       "   0.14645808795000004,\n",
       "   0.2346943971550003,\n",
       "   0.27124073191666687,\n",
       "   0.18594899529999986,\n",
       "   0.19499208958333364,\n",
       "   0.1692423491833333,\n",
       "   0.252968603666666,\n",
       "   0.1945093924666667,\n",
       "   0.2528532276100002,\n",
       "   0.26463106393333347,\n",
       "   0.23174838339999987,\n",
       "   0.17048091211666658,\n",
       "   0.2038476137966667,\n",
       "   0.24093589511666624],\n",
       "  'video_2017-09-05T14_34_55_arena2': [0.05150830582549997,\n",
       "   0.37047920989999905,\n",
       "   0.2708991506499993,\n",
       "   0.015517423966666725,\n",
       "   0.02977767495049993,\n",
       "   0.01585107276000002,\n",
       "   0.03276403760000001,\n",
       "   0.013971353800000036,\n",
       "   0.014044574563333374,\n",
       "   0.0848732766666666,\n",
       "   0.1468679800833332,\n",
       "   0.3972591151833337,\n",
       "   0.15082344679833318,\n",
       "   0.03296531108333332,\n",
       "   0.010151696233333382,\n",
       "   0.18344744240000022,\n",
       "   0.17648512680000036,\n",
       "   0.34734921238633343,\n",
       "   0.10579662074999956,\n",
       "   0.3955246180166662],\n",
       "  'video_2017-09-06T13_42_13_arena1': [0.19914456210000017,\n",
       "   0.16949821889999994,\n",
       "   0.22348147873333302,\n",
       "   0.2280706576833332,\n",
       "   0.03209452865233336,\n",
       "   0.043401834410000034,\n",
       "   0.13805788355000012,\n",
       "   0.027004811935000015,\n",
       "   0.16347629166666658,\n",
       "   0.15574743912500008,\n",
       "   0.2551406878166668,\n",
       "   0.25600536709999977,\n",
       "   0.24397993818333344,\n",
       "   0.06046466535533345,\n",
       "   0.014153641216666686,\n",
       "   0.01871253415000002,\n",
       "   0.02339125953333327,\n",
       "   0.07483080778333345,\n",
       "   0.1897650630833332,\n",
       "   0.26944196389999975],\n",
       "  'video_2017-09-06T14_45_32_arena3': [0.12622944533333322,\n",
       "   0.17033542516666653,\n",
       "   0.00844847275833339,\n",
       "   0.04215502144666678,\n",
       "   0.06664243467833328,\n",
       "   0.1393377000083332,\n",
       "   0.004104123150000034,\n",
       "   0.007932269600000019,\n",
       "   0.00676638828833337,\n",
       "   0.030710789033333342,\n",
       "   0.1142079032166665,\n",
       "   0.06602261081666677,\n",
       "   0.0981600339333333,\n",
       "   0.20074242071666717,\n",
       "   0.15953150896666657,\n",
       "   0.17552146791499973,\n",
       "   0.2951684497666675,\n",
       "   0.23172506810000013,\n",
       "   0.21236823390000006,\n",
       "   0.12026603056333299],\n",
       "  'video_2017-09-07T14_37_38_arena3': [0.20621190713333332,\n",
       "   0.2591886744333337,\n",
       "   0.1684453306266666,\n",
       "   0.1420885376000001,\n",
       "   0.20335877441666686,\n",
       "   0.1054174422250001,\n",
       "   0.03203793488333327,\n",
       "   0.013096118341666699,\n",
       "   0.01866259152000004,\n",
       "   0.08727705674999989,\n",
       "   0.1895471114166667,\n",
       "   0.18265970038333354,\n",
       "   0.18303226953333318,\n",
       "   0.18356132871833333,\n",
       "   0.18926655315000007,\n",
       "   0.15971244831666684,\n",
       "   0.1992138620100002,\n",
       "   0.17796058379999982,\n",
       "   0.20296776158333324,\n",
       "   0.14450766921666638],\n",
       "  'video_2017-09-07T14_37_38_arena4': [0.1290747950666666,\n",
       "   0.21930560628333326,\n",
       "   0.19217113323333312,\n",
       "   0.18631372876666663,\n",
       "   0.08388047649999997,\n",
       "   0.022211663496666645,\n",
       "   0.029328965606666747,\n",
       "   0.07486089496666669,\n",
       "   0.16844574133333354,\n",
       "   0.04321379849999998,\n",
       "   0.011643396883333374,\n",
       "   0.0035363947500000126,\n",
       "   0.011427950828333332,\n",
       "   0.012887656761666711,\n",
       "   0.029092028390000038,\n",
       "   0.06602959636666668,\n",
       "   0.15038082905499991,\n",
       "   0.06017472413333349,\n",
       "   0.09481995234833349,\n",
       "   0.0971261212166667],\n",
       "  'video_2017-09-08T13_26_13_arena3': [0.33647433973,\n",
       "   0.4174042538916664,\n",
       "   0.2952752817866663,\n",
       "   0.24820081992833418,\n",
       "   0.11166909353166646,\n",
       "   0.2510828626400002,\n",
       "   0.28130577662666667,\n",
       "   0.2911520956333336,\n",
       "   0.2868210219666668,\n",
       "   0.3863964160999995,\n",
       "   0.08693503208833332,\n",
       "   0.33203581984999997,\n",
       "   0.3744454630999989,\n",
       "   0.3116526025999995,\n",
       "   0.33713681201000006,\n",
       "   0.4127852337499996,\n",
       "   0.3566294692166665,\n",
       "   0.2805233281333331,\n",
       "   0.37456811543333407,\n",
       "   0.4072533773166657],\n",
       "  'video_2017-09-12T13_30_06_arena4': [0.243284912905,\n",
       "   0.2479127456499998,\n",
       "   0.22453936883333261,\n",
       "   0.15868459994999973,\n",
       "   0.24965278626666676,\n",
       "   0.1539656903033329,\n",
       "   0.21136746680000013,\n",
       "   0.0452727569383333,\n",
       "   0.027166191888333403,\n",
       "   0.04858955856666671,\n",
       "   0.014029939933333334,\n",
       "   0.12558126091666683,\n",
       "   0.26406044021666647,\n",
       "   0.2854613496000001,\n",
       "   0.28696410584999976,\n",
       "   0.25549642313333343,\n",
       "   0.2573889164999999,\n",
       "   0.22610340413333344,\n",
       "   0.24489779664999992,\n",
       "   0.1638544913849998],\n",
       "  'video_2017-09-12T14_36_55_arena3': [0.29060109531666617,\n",
       "   0.2341155541500003,\n",
       "   0.30343406325,\n",
       "   0.020081925233333367,\n",
       "   0.17612742891666677,\n",
       "   0.2362966721666664,\n",
       "   0.18470618388333315,\n",
       "   0.13482589132216674,\n",
       "   0.026134465149999984,\n",
       "   0.21498020581666646,\n",
       "   0.3141043741000001,\n",
       "   0.16925376603333336,\n",
       "   0.03778769281666665,\n",
       "   0.2977262669833339,\n",
       "   0.15591272912833337,\n",
       "   0.16214420983333364,\n",
       "   0.2338064285019998,\n",
       "   0.02421832769999996,\n",
       "   0.14492477081666688,\n",
       "   0.23901394821666713],\n",
       "  'video_2017-09-12T16_18_15_arena4': [0.062373371246666566,\n",
       "   0.2652443874666665,\n",
       "   0.3347169510333327,\n",
       "   0.15219512021666673,\n",
       "   0.35119212078333356,\n",
       "   0.17733204636333288,\n",
       "   0.27403759554999974,\n",
       "   0.267115056883334,\n",
       "   0.3132816694166665,\n",
       "   0.07401555753333351,\n",
       "   0.2234785229466666,\n",
       "   0.22643837601666655,\n",
       "   0.14222027226666623,\n",
       "   0.21448258001666654,\n",
       "   0.2604301857333328,\n",
       "   0.21624518461666686,\n",
       "   0.2605624720666665,\n",
       "   0.21024979746666655,\n",
       "   0.1914026835499999,\n",
       "   0.25417258356666705],\n",
       "  'video_2017-09-13T14_34_18_arena2': [0.3607425772466672,\n",
       "   0.4037152568333322,\n",
       "   0.33930202110000024,\n",
       "   0.1765606591733331,\n",
       "   0.1834021216983337,\n",
       "   0.4451269580666674,\n",
       "   0.5036217713999993,\n",
       "   0.48721781493333294,\n",
       "   0.4717955365000007,\n",
       "   0.4780834165999994,\n",
       "   0.32770195649999984,\n",
       "   0.4378087648166669,\n",
       "   0.34713351806666537,\n",
       "   0.4322813419999996,\n",
       "   0.36740611933333317,\n",
       "   0.43512865343333307,\n",
       "   0.4209343968166665,\n",
       "   0.4040429079166671,\n",
       "   0.26517030289999943,\n",
       "   0.2891579791333328],\n",
       "  'video_2017-09-20T13_43_53_arena3': [0.08560429115000003,\n",
       "   0.09111391592333348,\n",
       "   0.0966659090166666,\n",
       "   0.08738773473500014,\n",
       "   0.12367389860166673,\n",
       "   0.10495069893333331,\n",
       "   0.3395484593833328,\n",
       "   0.2623777124999999,\n",
       "   0.030082930120000004,\n",
       "   0.2718569931833329,\n",
       "   0.14177618680000031,\n",
       "   0.1607960309033334,\n",
       "   0.17670711758833368,\n",
       "   0.01873649418016672,\n",
       "   0.01635103956666668,\n",
       "   0.10192951048333329,\n",
       "   0.2028602720333328,\n",
       "   0.22739233246666693,\n",
       "   0.11681039276666667,\n",
       "   0.04997780150000004],\n",
       "  'video_2017-09-20T14_48_55_arena2': [0.021619875616666676,\n",
       "   0.010971052871666666,\n",
       "   0.13428063568666662,\n",
       "   0.16102692446666647,\n",
       "   0.19932703165,\n",
       "   0.08327007481666672,\n",
       "   0.018399316016666712,\n",
       "   0.16120804043333323,\n",
       "   0.16679703159999987,\n",
       "   0.17965347270000023,\n",
       "   0.18923072523333362,\n",
       "   0.19006706345,\n",
       "   0.15217900331666678,\n",
       "   0.12595675561666675,\n",
       "   0.07695361336666653,\n",
       "   0.006991856825000018,\n",
       "   0.010089596558333368,\n",
       "   0.010708664843333377,\n",
       "   0.017077191003333332,\n",
       "   0.09367503276333299],\n",
       "  'video_2017-09-21T13_38_55_arena4': [0.1478710040166668,\n",
       "   0.18887935319166665,\n",
       "   0.1957523367166669,\n",
       "   0.1572898247500001,\n",
       "   0.03905729476666669,\n",
       "   0.1506408098999996,\n",
       "   0.17736184044999953,\n",
       "   0.016747768766666747,\n",
       "   0.10211979328166701,\n",
       "   0.2638957796999996,\n",
       "   0.15563736951666649,\n",
       "   0.03167480103333338,\n",
       "   0.08331169313666661,\n",
       "   0.23586816249999976,\n",
       "   0.11754051198333328,\n",
       "   0.08337026535000001,\n",
       "   0.01413372795000004,\n",
       "   0.07251102353999997,\n",
       "   0.2668358082833333,\n",
       "   0.2825474539966661],\n",
       "  'video_2017-09-21T15_57_23_arena2': [0.078938081033333,\n",
       "   0.03767076105166681,\n",
       "   0.04935366506500003,\n",
       "   0.17430877405499987,\n",
       "   0.19025905236666693,\n",
       "   0.2540521138666664,\n",
       "   0.06599089264833341,\n",
       "   0.2558824607800009,\n",
       "   0.22381519214999962,\n",
       "   0.03677617366666654,\n",
       "   0.015580611626666702,\n",
       "   0.01554041158666669,\n",
       "   0.17857041678333319,\n",
       "   0.31196617208333266,\n",
       "   0.350908469383333,\n",
       "   0.1992082056000003,\n",
       "   0.3363694481999996,\n",
       "   0.3355535427000005,\n",
       "   0.31922219118500034,\n",
       "   0.28132475081666586],\n",
       "  'video_2017-09-26T13_40_19_arena1': [0.4119625717666665,\n",
       "   0.39713841713333287,\n",
       "   0.2814265619933334,\n",
       "   0.39756960104000094,\n",
       "   0.2515904113016667,\n",
       "   0.16520373351500012,\n",
       "   0.033765841000000005,\n",
       "   0.13203965326333314,\n",
       "   0.10696331957999983,\n",
       "   0.04037854904500022,\n",
       "   0.06887309059999995,\n",
       "   0.10304055530000011,\n",
       "   0.06567280005666674,\n",
       "   0.14371185766666653,\n",
       "   0.018364904661666737,\n",
       "   0.02263055758166667,\n",
       "   0.06954123891333329,\n",
       "   0.09769722378333341,\n",
       "   0.3798074714500011,\n",
       "   0.27629209306666663],\n",
       "  'video_2017-09-28T13_36_06_arena4': [0.3511013056666663,\n",
       "   0.3664425482833335,\n",
       "   0.355936018233333,\n",
       "   0.30855821666666666,\n",
       "   0.3214044894500011,\n",
       "   0.15031768785,\n",
       "   0.35987682816666733,\n",
       "   0.28148767686666687,\n",
       "   0.2856780742333332,\n",
       "   0.18529107096666692,\n",
       "   0.33741531233333344,\n",
       "   0.29722526745000083,\n",
       "   0.30285943418333255,\n",
       "   0.16127692789333348,\n",
       "   0.3466308232499996,\n",
       "   0.10245240303666672,\n",
       "   0.308242335966666,\n",
       "   0.20956332140666661,\n",
       "   0.2886008937000002,\n",
       "   0.30464636701000003],\n",
       "  'video_2017-09-28T14_44_01_arena3': [0.3489035331000006,\n",
       "   0.20646928218333294,\n",
       "   0.2923470370500001,\n",
       "   0.22575445703333316,\n",
       "   0.3548715803166671,\n",
       "   0.2843902722500006,\n",
       "   0.27789717226666666,\n",
       "   0.1394091128499998,\n",
       "   0.3599121237666669,\n",
       "   0.2717335133666669,\n",
       "   0.3016679321000005,\n",
       "   0.2813896531833335,\n",
       "   0.29638773101666643,\n",
       "   0.3522336256333339,\n",
       "   0.3868199237333332,\n",
       "   0.3956322948499999,\n",
       "   0.16352333034999997,\n",
       "   0.23501387165,\n",
       "   0.36385688100000035,\n",
       "   0.31452479041666653],\n",
       "  'video_2017-09-28T15_55_49_arena3': [0.30965984335000035,\n",
       "   0.2962253683916672,\n",
       "   0.29310448740000006,\n",
       "   0.10905004165166686,\n",
       "   0.2727764872333332,\n",
       "   0.2252922388816659,\n",
       "   0.2307269959833333,\n",
       "   0.14588394096666682,\n",
       "   0.3014302461916669,\n",
       "   0.13379351511666654,\n",
       "   0.15019936445666662,\n",
       "   0.2309847248333327,\n",
       "   0.22244420458333322,\n",
       "   0.019038446556666706,\n",
       "   0.19543609471666684,\n",
       "   0.11908187068333337,\n",
       "   0.2357120856500002,\n",
       "   0.20908097568333286,\n",
       "   0.10240391798333341,\n",
       "   0.28006471618833334],\n",
       "  'video_2017-10-12T15_50_43_arena2': [0.10597784924999999,\n",
       "   0.18481080560000032,\n",
       "   0.1194643108500003,\n",
       "   0.02523933556333337,\n",
       "   0.14258620205000008,\n",
       "   0.18414726905000012,\n",
       "   0.0911498565666668,\n",
       "   0.12285355553333317,\n",
       "   0.1598534800833336,\n",
       "   0.030373980990000007,\n",
       "   0.006718102003333344,\n",
       "   0.06609892718333345,\n",
       "   0.11443119869666661,\n",
       "   0.18418348976666626,\n",
       "   0.17792965121666632,\n",
       "   0.03592275638333326,\n",
       "   0.048291632136666846,\n",
       "   0.20538981066666617,\n",
       "   0.0662626231166666,\n",
       "   0.015806694483333352],\n",
       "  'video_2017-10-13T16_06_33_arena2': [0.18062095231666672,\n",
       "   0.19123809286666615,\n",
       "   0.08785379528000016,\n",
       "   0.09104836215000002,\n",
       "   0.05486488541500009,\n",
       "   0.1299800764833338,\n",
       "   0.061354754929999845,\n",
       "   0.0845425956066667,\n",
       "   0.15391646214999988,\n",
       "   0.14007184646666668,\n",
       "   0.20967767413333355,\n",
       "   0.03132229611500001,\n",
       "   0.08166617173499963,\n",
       "   0.04334529240000006,\n",
       "   0.1422410007833335,\n",
       "   0.14727167381666664,\n",
       "   0.19204727586666676,\n",
       "   0.2656661031333338,\n",
       "   0.3182893802333333,\n",
       "   0.2517071470499999],\n",
       "  'video_2017-10-18T15_19_17_arena3': [0.39588094273333196,\n",
       "   0.28137464042499966,\n",
       "   0.2739357070499999,\n",
       "   0.37572681633333305,\n",
       "   0.3327723712333328,\n",
       "   0.24071078981666652,\n",
       "   0.3211829662166666,\n",
       "   0.3732053376999995,\n",
       "   0.22499044355000025,\n",
       "   0.2761478844833328,\n",
       "   0.23818884580000044,\n",
       "   0.2295413203666667,\n",
       "   0.20493786466833355,\n",
       "   0.3132798215000001,\n",
       "   0.3357963414333333,\n",
       "   0.2353691513666671,\n",
       "   0.34749293593333386,\n",
       "   0.16773703161666695,\n",
       "   0.30560374411666674,\n",
       "   0.23305235528333357],\n",
       "  'video_2017-10-19T13_50_56_arena2': [0.2582218560166669,\n",
       "   0.23632270009999995,\n",
       "   0.22138248705,\n",
       "   0.23184880434999977,\n",
       "   0.24987688485000029,\n",
       "   0.21669870666666613,\n",
       "   0.19550267226666673,\n",
       "   0.26178222983333344,\n",
       "   0.23026385949999956,\n",
       "   0.18211547259999997,\n",
       "   0.16515651164999998,\n",
       "   0.2222169828666669,\n",
       "   0.26482103800000045,\n",
       "   0.1912266980000003,\n",
       "   0.19585551756666655,\n",
       "   0.2534185758000002,\n",
       "   0.20115659408333322,\n",
       "   0.2003827683999999,\n",
       "   0.21516811724999962,\n",
       "   0.20145469230000024],\n",
       "  'video_2017-10-20T13_21_06_arena2': [0.4280672046833331,\n",
       "   0.3269134036666668,\n",
       "   0.39992191997166743,\n",
       "   0.03728452355666667,\n",
       "   0.02528908454999994,\n",
       "   0.019256517643333384,\n",
       "   0.04805849972499995,\n",
       "   0.030392750450000006,\n",
       "   0.2493485129333334,\n",
       "   0.1984653056900001,\n",
       "   0.33121209814999886,\n",
       "   0.23690235349999958,\n",
       "   0.2552837905266659,\n",
       "   0.01713209830833334,\n",
       "   0.2781905846,\n",
       "   0.2986144266866671,\n",
       "   0.3325167994666663,\n",
       "   0.3105572367766664,\n",
       "   0.4498613902649994,\n",
       "   0.4324045650999998],\n",
       "  'video_2017-10-20T15_44_09_arena2': [0.021496472288333308,\n",
       "   0.12449683873999991,\n",
       "   0.41054838795000065,\n",
       "   0.3831408177833331,\n",
       "   0.3356693909833326,\n",
       "   0.39630663783333314,\n",
       "   0.32628193758333246,\n",
       "   0.37191891973333313,\n",
       "   0.3307098221500001,\n",
       "   0.340798722966667,\n",
       "   0.10629311190333296,\n",
       "   0.30751200125000017,\n",
       "   0.1813272317000005,\n",
       "   0.3625512287499995,\n",
       "   0.3788518950333334,\n",
       "   0.24390923974999992,\n",
       "   0.4079990413500002,\n",
       "   0.3442161720833329,\n",
       "   0.2652058566666665,\n",
       "   0.32314059145000035],\n",
       "  'video_2017-10-24T16_13_35_arena4': [0.37952212655000056,\n",
       "   0.36826512163333386,\n",
       "   0.31341588234500034,\n",
       "   0.270749999833334,\n",
       "   0.26419299444999983,\n",
       "   0.2992153797999999,\n",
       "   0.18995469133333315,\n",
       "   0.263152035643334,\n",
       "   0.23244195691666672,\n",
       "   0.1540016145999994,\n",
       "   0.25151475829999953,\n",
       "   0.278460622633333,\n",
       "   0.13528312796666675,\n",
       "   0.23427153503333376,\n",
       "   0.20619022215000055,\n",
       "   0.28626162536666666,\n",
       "   0.21594483045499993,\n",
       "   0.17740299408333335,\n",
       "   0.15766871275000024,\n",
       "   0.22640478931666694],\n",
       "  'video_2017-10-25T14_55_12_arena1': [0.011610479045000082,\n",
       "   0.019805197484166738,\n",
       "   0.014409044675000102,\n",
       "   0.018809352830000087,\n",
       "   0.13496587158333384,\n",
       "   0.02829142648000012,\n",
       "   0.10201795525000018,\n",
       "   0.04130812850000007,\n",
       "   0.019971120993333338,\n",
       "   0.01602325148000009,\n",
       "   0.016191142306666698,\n",
       "   0.016658965645000027,\n",
       "   0.020900770141666723,\n",
       "   0.019871190235333357,\n",
       "   0.031060735893333365,\n",
       "   0.12845232423333336,\n",
       "   0.15743869861666676,\n",
       "   0.19773026750000003,\n",
       "   0.03198217598833334,\n",
       "   0.020010075933333427],\n",
       "  'video_2017-11-02T13_37_48_arena3': [0.19165011817833347,\n",
       "   0.2952292640333331,\n",
       "   0.2014706492666663,\n",
       "   0.2223054181333331,\n",
       "   0.28241864524999943,\n",
       "   0.27397906166666675,\n",
       "   0.22048429475000003,\n",
       "   0.26816202628333335,\n",
       "   0.07585540336500003,\n",
       "   0.012007267751666752,\n",
       "   0.2086200592333332,\n",
       "   0.19505456926666648,\n",
       "   0.12228929451666655,\n",
       "   0.1610799389666666,\n",
       "   0.18973901128333348,\n",
       "   0.21909097231666655,\n",
       "   0.3077741528166666,\n",
       "   0.06298956258333335,\n",
       "   0.21051958298333331,\n",
       "   0.16296652407833342],\n",
       "  'video_2017-11-02T14_48_28_arena4': [0.24106188813333376,\n",
       "   0.15115885055000022,\n",
       "   0.3021918569,\n",
       "   0.2265852831866667,\n",
       "   0.11196315931499998,\n",
       "   0.26541010538333304,\n",
       "   0.2037565715000001,\n",
       "   0.19775334377666637,\n",
       "   0.1940526050166668,\n",
       "   0.13823871396666687,\n",
       "   0.2888531449833335,\n",
       "   0.04233978208333337,\n",
       "   0.033695417029999994,\n",
       "   0.18918077028333308,\n",
       "   0.23951929113333312,\n",
       "   0.24181639768333416,\n",
       "   0.2981525675499991,\n",
       "   0.19567734971666637,\n",
       "   0.1384655899500001,\n",
       "   0.22814042097999976],\n",
       "  'video_2017-11-02T16_11_06_arena3': [0.20963980340000007,\n",
       "   0.14548492087999992,\n",
       "   0.01568338414666669,\n",
       "   0.18252102630000003,\n",
       "   0.2618757021333337,\n",
       "   0.26994485146666675,\n",
       "   0.23622835578333368,\n",
       "   0.22602268678666695,\n",
       "   0.2462640726166661,\n",
       "   0.10057731771666621,\n",
       "   0.01679823420000004,\n",
       "   0.19316091795000034,\n",
       "   0.2241899342500001,\n",
       "   0.24772487611666727,\n",
       "   0.11879850145000001,\n",
       "   0.24894520009999996,\n",
       "   0.20479762401666673,\n",
       "   0.20592829153499984,\n",
       "   0.19685174181666662,\n",
       "   0.18235560578333318],\n",
       "  'video_2017-11-03T14_54_45_arena1': [0.32723279541833367,\n",
       "   0.2634265734666664,\n",
       "   0.18851082388333282,\n",
       "   0.08865447143333327,\n",
       "   0.2467381418383335,\n",
       "   0.2381904018833331,\n",
       "   0.2855863916999998,\n",
       "   0.19177349565000018,\n",
       "   0.1559126570933335,\n",
       "   0.2492408280833332,\n",
       "   0.23884557151999997,\n",
       "   0.23614795786333306,\n",
       "   0.1360563574333334,\n",
       "   0.10903561855,\n",
       "   0.030086333416666687,\n",
       "   0.16714995754666628,\n",
       "   0.30690374739999976,\n",
       "   0.27813449391666645,\n",
       "   0.1304725971983332,\n",
       "   0.027413219400000022],\n",
       "  'video_2017-11-03T16_20_50_arena4': [0.42553998953333383,\n",
       "   0.4131213167333325,\n",
       "   0.3901998947500008,\n",
       "   0.30050032751666683,\n",
       "   0.17152813814666668,\n",
       "   0.09423704835000003,\n",
       "   0.4415579227333328,\n",
       "   0.40719707820000023,\n",
       "   0.3740232850666665,\n",
       "   0.3629457809533336,\n",
       "   0.12503734533333327,\n",
       "   0.34683561289999953,\n",
       "   0.35673007338333285,\n",
       "   0.35948872175000035,\n",
       "   0.3969530878000001,\n",
       "   0.35373456571666667,\n",
       "   0.3281123834833336,\n",
       "   0.40370076638333313,\n",
       "   0.3258583382166669,\n",
       "   0.29330410908333354],\n",
       "  'video_2017-12-20T12_58_51_arena4': [0.2674598873666669,\n",
       "   0.16611363823333358,\n",
       "   0.2480403077333338,\n",
       "   0.0989412610000001,\n",
       "   0.05666748913333334,\n",
       "   0.2503320423333333,\n",
       "   0.24911427128333338,\n",
       "   0.20023161368333314,\n",
       "   0.2313918679999994,\n",
       "   0.20771050793333357,\n",
       "   0.21523600541666654,\n",
       "   0.11940775133333337,\n",
       "   0.10891981579999992,\n",
       "   0.07032633638333338,\n",
       "   0.23411979696666688,\n",
       "   0.2713959484500001,\n",
       "   0.2743105825,\n",
       "   0.28032574014999967,\n",
       "   0.1405099783500001,\n",
       "   0.1527841308],\n",
       "  'video_2017-12-20T14_01_01_arena3': [0.11041924271666675,\n",
       "   0.15007148570000015,\n",
       "   0.17102266793333323,\n",
       "   0.16579137040000005,\n",
       "   0.08974693356666649,\n",
       "   0.09949408731666673,\n",
       "   0.03947245569500005,\n",
       "   0.07310454161666663,\n",
       "   0.08101910018833318,\n",
       "   0.020421639449999973,\n",
       "   0.10214124969999988,\n",
       "   0.11942343290499986,\n",
       "   0.11558743876666669,\n",
       "   0.08958004696666663,\n",
       "   0.09089078103333342,\n",
       "   0.09706699198000007,\n",
       "   0.14062677587166655,\n",
       "   0.19360005524999993,\n",
       "   0.18271786830000053,\n",
       "   0.19693405599999983]},\n",
       " 'virgin_mated24h': {'video_2017-09-05T13_28_41_arena3': [0.16313207541500027,\n",
       "   0.3431483288333326,\n",
       "   0.3117254261333338,\n",
       "   0.26107493329999987,\n",
       "   0.07440415298333328,\n",
       "   0.039249961424999966,\n",
       "   0.05807176085000005,\n",
       "   0.2629889497166664,\n",
       "   0.25735347183333346,\n",
       "   0.26278823346333363,\n",
       "   0.1858357996666668,\n",
       "   0.15836453849333354,\n",
       "   0.18086182638333326,\n",
       "   0.14077904011166684,\n",
       "   0.2141685381333337,\n",
       "   0.041570920950000055,\n",
       "   0.05013126293000004,\n",
       "   0.1226692348666666,\n",
       "   0.18858665811666644,\n",
       "   0.1501583959666671],\n",
       "  'video_2017-09-07T16_01_26_arena4': [0.20339993976666687,\n",
       "   0.21152190733333365,\n",
       "   0.25801424655000077,\n",
       "   0.14899899648000023,\n",
       "   0.15662237497499992,\n",
       "   0.24264340588333358,\n",
       "   0.22846908028333324,\n",
       "   0.2603880868833335,\n",
       "   0.2288027559166669,\n",
       "   0.24823054705000008,\n",
       "   0.21727567166666661,\n",
       "   0.25730938215000043,\n",
       "   0.2142198273299999,\n",
       "   0.2152487623000001,\n",
       "   0.27962835926666657,\n",
       "   0.1720398774333334,\n",
       "   0.25320422925000047,\n",
       "   0.21735097517499988,\n",
       "   0.30352009888333326,\n",
       "   0.1724387762833332],\n",
       "  'video_2017-09-08T14_31_59_arena2': [0.38112294253333334,\n",
       "   0.21281369294999994,\n",
       "   0.3396419680666673,\n",
       "   0.29453926255000007,\n",
       "   0.1950874935283332,\n",
       "   0.2781797002166671,\n",
       "   0.251331761516667,\n",
       "   0.27600941751666735,\n",
       "   0.3136050521833329,\n",
       "   0.20489627303333377,\n",
       "   0.1563498235000001,\n",
       "   0.2632278061166667,\n",
       "   0.1869499960333336,\n",
       "   0.2723440525499996,\n",
       "   0.28171835891666774,\n",
       "   0.2581016927833338,\n",
       "   0.22051544675000015,\n",
       "   0.10546736345,\n",
       "   0.33713416616666725,\n",
       "   0.3141257273333341],\n",
       "  'video_2017-09-08T14_31_59_arena3': [0.3326717472333342,\n",
       "   0.27124226940000035,\n",
       "   0.21832023093333316,\n",
       "   0.1885275063166665,\n",
       "   0.2044812476166665,\n",
       "   0.21447555184999956,\n",
       "   0.20119593615000017,\n",
       "   0.1854757336999999,\n",
       "   0.15549730208333343,\n",
       "   0.1839217125833336,\n",
       "   0.21829384304999994,\n",
       "   0.11985010452166638,\n",
       "   0.1543469983000002,\n",
       "   0.3438356378499996,\n",
       "   0.26564687013333355,\n",
       "   0.25345230419999987,\n",
       "   0.19183750224999965,\n",
       "   0.2202485765333331,\n",
       "   0.1778323032500002,\n",
       "   0.21446031373333374],\n",
       "  'video_2017-09-12T13_30_06_arena1': [0.1239404133333329,\n",
       "   0.2397777326999996,\n",
       "   0.10310213119666697,\n",
       "   0.2676867371666667,\n",
       "   0.3062567247333335,\n",
       "   0.2373649787166664,\n",
       "   0.20801502266666702,\n",
       "   0.2566301004166671,\n",
       "   0.2452759131833331,\n",
       "   0.24788712021666687,\n",
       "   0.17837665940000003,\n",
       "   0.12467747888333344,\n",
       "   0.1905765464166663,\n",
       "   0.19820560993333333,\n",
       "   0.2202509924,\n",
       "   0.20158197286666674,\n",
       "   0.2071886572833329,\n",
       "   0.1899959861666669,\n",
       "   0.17311793630000008,\n",
       "   0.2154952240333338],\n",
       "  'video_2017-09-13T15_40_03_arena1': [0.42594970128333415,\n",
       "   0.18540134699666677,\n",
       "   0.3244340896666664,\n",
       "   0.21511857838333318,\n",
       "   0.03589461691666665,\n",
       "   0.365073629666667,\n",
       "   0.2986418523833336,\n",
       "   0.25484023515000004,\n",
       "   0.12956834853333365,\n",
       "   0.3525265705666669,\n",
       "   0.32498784398166675,\n",
       "   0.2961828162583334,\n",
       "   0.26218464486833326,\n",
       "   0.24282181840000006,\n",
       "   0.18431310328666678,\n",
       "   0.10428849995000007,\n",
       "   0.2896165270666669,\n",
       "   0.36171453390000025,\n",
       "   0.19791890986666666,\n",
       "   0.29485104098333365],\n",
       "  'video_2017-09-14T14_47_16_arena4': [0.08928733531666652,\n",
       "   0.26225944419999936,\n",
       "   0.25000881336666675,\n",
       "   0.25190377125000046,\n",
       "   0.2110689174333333,\n",
       "   0.11677567111666677,\n",
       "   0.09569802039999996,\n",
       "   0.0916833012666668,\n",
       "   0.13111356133333327,\n",
       "   0.18845560281666604,\n",
       "   0.07646092881666666,\n",
       "   0.08082909060000011,\n",
       "   0.13572324245000003,\n",
       "   0.05938450784999999,\n",
       "   0.055735255776666714,\n",
       "   0.011369589740000033,\n",
       "   0.01146472831833339,\n",
       "   0.0193999582333334,\n",
       "   0.025811827316666668,\n",
       "   0.01472403836666667],\n",
       "  'video_2017-09-20T13_43_53_arena1': [0.21789339654999992,\n",
       "   0.21099035213333345,\n",
       "   0.14439957740000006,\n",
       "   0.1390786489666667,\n",
       "   0.18246235872500047,\n",
       "   0.22621906593333369,\n",
       "   0.20131557913333334,\n",
       "   0.09419540565666656,\n",
       "   0.15141327943333316,\n",
       "   0.14178822262,\n",
       "   0.1319782592666665,\n",
       "   0.1731044175499999,\n",
       "   0.16969069738333312,\n",
       "   0.15104196541666648,\n",
       "   0.18235101621666666,\n",
       "   0.15403806986666682,\n",
       "   0.14076886869999983,\n",
       "   0.16348967198333342,\n",
       "   0.1744344799666667,\n",
       "   0.17035700043333293],\n",
       "  'video_2017-09-26T14_52_18_arena2': [0.3020530205166661,\n",
       "   0.23218289489000032,\n",
       "   0.017784707448333353,\n",
       "   0.04863928541666665,\n",
       "   0.030194115416666712,\n",
       "   0.2688663243500005,\n",
       "   0.3056332171500003,\n",
       "   0.09910483228999992,\n",
       "   0.016947344135166655,\n",
       "   0.04011262834000008,\n",
       "   0.03602120721000006,\n",
       "   0.02953377343333337,\n",
       "   0.2426846401166664,\n",
       "   0.07527605818333319,\n",
       "   0.18756037691666694,\n",
       "   0.09248901094666678,\n",
       "   0.12808261236666665,\n",
       "   0.06871039976666678,\n",
       "   0.1125808467833335,\n",
       "   0.014818267001666682],\n",
       "  'video_2017-09-27T15_06_20_arena3': [0.30784757269999935,\n",
       "   0.18570240280833306,\n",
       "   0.2846896735166659,\n",
       "   0.21494093691666652,\n",
       "   0.1966191286166668,\n",
       "   0.037698198679999996,\n",
       "   0.20848802288333348,\n",
       "   0.27436099489999966,\n",
       "   0.2668869481500004,\n",
       "   0.23138252923333347,\n",
       "   0.226333678,\n",
       "   0.25667637680000044,\n",
       "   0.2141407932333333,\n",
       "   0.24825599308333288,\n",
       "   0.19183303335,\n",
       "   0.21020268589999969,\n",
       "   0.22299327835000035,\n",
       "   0.2286578578166664,\n",
       "   0.23062590630000038,\n",
       "   0.19879638113333295],\n",
       "  'video_2017-10-11T13_30_05_arena1': [0.319011103153333,\n",
       "   0.3812829389000003,\n",
       "   0.3375538945166661,\n",
       "   0.31685518924999967,\n",
       "   0.352671257081667,\n",
       "   0.35607920501666696,\n",
       "   0.31351521512833264,\n",
       "   0.23867708100000004,\n",
       "   0.3159939181999992,\n",
       "   0.17045708056333295,\n",
       "   0.31219172634999987,\n",
       "   0.31490282405499964,\n",
       "   0.24225668244333326,\n",
       "   0.24180908853333247,\n",
       "   0.3185670343333329,\n",
       "   0.2824471151499996,\n",
       "   0.3217469033333331,\n",
       "   0.2762822731833341,\n",
       "   0.24234522219999974,\n",
       "   0.3159773570666674],\n",
       "  'video_2017-10-11T16_00_50_arena4': [0.32892251291666696,\n",
       "   0.2307906702166667,\n",
       "   0.26869982933333336,\n",
       "   0.2470895351000001,\n",
       "   0.3326028003333336,\n",
       "   0.274447625766666,\n",
       "   0.33307705298333373,\n",
       "   0.3654913366666661,\n",
       "   0.18508665036666655,\n",
       "   0.30506039996666623,\n",
       "   0.22359975948333324,\n",
       "   0.1652898021513332,\n",
       "   0.3281287590499995,\n",
       "   0.2612359746833333,\n",
       "   0.28628320125,\n",
       "   0.24299428216666694,\n",
       "   0.2849835162833339,\n",
       "   0.28355352760000063,\n",
       "   0.23658894866666672,\n",
       "   0.3752062240666671],\n",
       "  'video_2017-10-13T14_37_35_arena1': [0.1674754386666668,\n",
       "   0.1310446416999999,\n",
       "   0.1968507586166665,\n",
       "   0.1727356497333332,\n",
       "   0.16697585706666607,\n",
       "   0.14626795540000004,\n",
       "   0.10547270618333307,\n",
       "   0.15833094176666632,\n",
       "   0.13826722716666665,\n",
       "   0.1405207941083335,\n",
       "   0.16232004543333317,\n",
       "   0.15656214323333345,\n",
       "   0.045029983616666776,\n",
       "   0.15056751401666701,\n",
       "   0.15849300068333344,\n",
       "   0.13207644646666702,\n",
       "   0.11430811924999991,\n",
       "   0.13578732134999996,\n",
       "   0.14637306393333327,\n",
       "   0.16691617993333333],\n",
       "  'video_2017-10-13T14_37_35_arena2': [0.22054887250000002,\n",
       "   0.11604504458333326,\n",
       "   0.15483612296666668,\n",
       "   0.2354066600166662,\n",
       "   0.25407137120000034,\n",
       "   0.2164308603633335,\n",
       "   0.30357559201666695,\n",
       "   0.21910284722666667,\n",
       "   0.25343954629999954,\n",
       "   0.22344276286666642,\n",
       "   0.21864433880000073,\n",
       "   0.19204834141666663,\n",
       "   0.23970633239999983,\n",
       "   0.12827476660000045,\n",
       "   0.2060554895499999,\n",
       "   0.16615566291666653,\n",
       "   0.2574442979666663,\n",
       "   0.20878320771666642,\n",
       "   0.2654174860333333,\n",
       "   0.2706565425166672],\n",
       "  'video_2017-10-13T14_37_35_arena3': [0.20779721841666618,\n",
       "   0.19504212618333347,\n",
       "   0.20338474668333326,\n",
       "   0.190700888333333,\n",
       "   0.20682221838333312,\n",
       "   0.1553668586833331,\n",
       "   0.11512103713333344,\n",
       "   0.20331282900000014,\n",
       "   0.20175087881666623,\n",
       "   0.1771881940666667,\n",
       "   0.20609811716666676,\n",
       "   0.1969167366500003,\n",
       "   0.09023923325000015,\n",
       "   0.12121040071666665,\n",
       "   0.1467420567333332,\n",
       "   0.1775136089833336,\n",
       "   0.1426772066333333,\n",
       "   0.17645151946666657,\n",
       "   0.19810079628333332,\n",
       "   0.17467499355833313],\n",
       "  'video_2017-10-19T13_50_56_arena4': [0.2680096623999999,\n",
       "   0.28006991691666727,\n",
       "   0.14623797818333328,\n",
       "   0.2737449974833331,\n",
       "   0.29178552745,\n",
       "   0.08557122336333367,\n",
       "   0.030697205228333357,\n",
       "   0.01824676238333337,\n",
       "   0.2561406095000002,\n",
       "   0.3051859300166666,\n",
       "   0.25249708668333326,\n",
       "   0.18624441495000013,\n",
       "   0.2684707211166663,\n",
       "   0.26453904026666697,\n",
       "   0.20464569463333293,\n",
       "   0.2534217581583337,\n",
       "   0.21513640600833325,\n",
       "   0.11685014964333305,\n",
       "   0.2561729184333335,\n",
       "   0.3151765422666665],\n",
       "  'video_2017-10-19T14_58_20_arena3': [0.2526772686333334,\n",
       "   0.25915993186666625,\n",
       "   0.28484840453333315,\n",
       "   0.26490098893333264,\n",
       "   0.28810336230000005,\n",
       "   0.2565913551000002,\n",
       "   0.28938860516666665,\n",
       "   0.14653023444999955,\n",
       "   0.07761821430000027,\n",
       "   0.20408115582833297,\n",
       "   0.2510930553166659,\n",
       "   0.24954986566666743,\n",
       "   0.18057218906666653,\n",
       "   0.13263480352333365,\n",
       "   0.271785988166667,\n",
       "   0.25807776534999943,\n",
       "   0.2635887450333334,\n",
       "   0.24480552798333344,\n",
       "   0.29195675183333347,\n",
       "   0.25154282296666697],\n",
       "  'video_2017-10-19T16_19_37_arena2': [0.23172675115,\n",
       "   0.15269522748333292,\n",
       "   0.162701506566667,\n",
       "   0.16911327753333308,\n",
       "   0.18707359898333345,\n",
       "   0.1692418150000001,\n",
       "   0.08061352765000003,\n",
       "   0.1849523263666665,\n",
       "   0.1401213286500004,\n",
       "   0.10740442154999992,\n",
       "   0.17460987784999962,\n",
       "   0.15644492995,\n",
       "   0.11877021651666668,\n",
       "   0.12382834025000018,\n",
       "   0.1358261369000001,\n",
       "   0.08622311543333322,\n",
       "   0.15411495163333336,\n",
       "   0.15386549478333336,\n",
       "   0.10672346650000014,\n",
       "   0.15482922664999982],\n",
       "  'video_2017-10-20T14_31_24_arena3': [0.24076591729999983,\n",
       "   0.23546870638166617,\n",
       "   0.23282758328333303,\n",
       "   0.13152256856999994,\n",
       "   0.2124163224333339,\n",
       "   0.21077585643333346,\n",
       "   0.25212143708333307,\n",
       "   0.2698585999666675,\n",
       "   0.2179736973833332,\n",
       "   0.17982106278333332,\n",
       "   0.27904503631666705,\n",
       "   0.17497595061666654,\n",
       "   0.10506873811666657,\n",
       "   0.2900664619,\n",
       "   0.2715639795666663,\n",
       "   0.22033698828333317,\n",
       "   0.24302095683333289,\n",
       "   0.1454140481466671,\n",
       "   0.019009459233333362,\n",
       "   0.13792654223166673],\n",
       "  'video_2017-10-20T14_31_24_arena4': [0.12887530321666668,\n",
       "   0.013922727883333343,\n",
       "   0.16922567750000034,\n",
       "   0.21186533401666652,\n",
       "   0.21856445795000018,\n",
       "   0.2727645620666666,\n",
       "   0.2031448688833339,\n",
       "   0.17067953671666714,\n",
       "   0.2099981792500001,\n",
       "   0.1853793187666666,\n",
       "   0.20267693393333347,\n",
       "   0.18254641661833332,\n",
       "   0.18721823673333318,\n",
       "   0.22045240845000005,\n",
       "   0.1771938645166666,\n",
       "   0.18804222071666668,\n",
       "   0.2100845264333334,\n",
       "   0.08785299328333337,\n",
       "   0.1893023003333332,\n",
       "   0.20371606048333357],\n",
       "  'video_2017-10-24T13_43_26_arena3': [0.2916685626900002,\n",
       "   0.3443703694999999,\n",
       "   0.3307075670499993,\n",
       "   0.3626225616166662,\n",
       "   0.41547699148716744,\n",
       "   0.41592299405000055,\n",
       "   0.23474041646666607,\n",
       "   0.2633250363833336,\n",
       "   0.33574936053333326,\n",
       "   0.3056684478266662,\n",
       "   0.21859617805333334,\n",
       "   0.2709768843999999,\n",
       "   0.25103141553333364,\n",
       "   0.2952687762166666,\n",
       "   0.2903766709200001,\n",
       "   0.25510754733333285,\n",
       "   0.2568386269550001,\n",
       "   0.3391961750333333,\n",
       "   0.3156955972833337,\n",
       "   0.3036596163500002],\n",
       "  'video_2017-10-25T13_39_35_arena1': [0.2737833275499991,\n",
       "   0.1628263660500002,\n",
       "   0.25938123655000017,\n",
       "   0.2439962222000002,\n",
       "   0.2673262746166665,\n",
       "   0.21049338321666622,\n",
       "   0.17297211930666664,\n",
       "   0.18709011729999983,\n",
       "   0.14170707069999994,\n",
       "   0.10045926955666683,\n",
       "   0.19311297070000008,\n",
       "   0.1056145478999999,\n",
       "   0.07828248728333342,\n",
       "   0.18675486598333316,\n",
       "   0.10472505118333329,\n",
       "   0.2178459238500002,\n",
       "   0.13082184238333333,\n",
       "   0.061396972865000114,\n",
       "   0.08310400225000007,\n",
       "   0.2122213998500005],\n",
       "  'video_2017-10-25T14_55_12_arena2': [0.2505714802633338,\n",
       "   0.32446881990000015,\n",
       "   0.36847414429833397,\n",
       "   0.31020478427666665,\n",
       "   0.2794245130833328,\n",
       "   0.12871740155000036,\n",
       "   0.03378917692833331,\n",
       "   0.3149954271499997,\n",
       "   0.03571011423500002,\n",
       "   0.03730893789999999,\n",
       "   0.06177149992833341,\n",
       "   0.1995399033000002,\n",
       "   0.2817333986716671,\n",
       "   0.23770413156666695,\n",
       "   0.3571856137166677,\n",
       "   0.25268044302166665,\n",
       "   0.17517298018500047,\n",
       "   0.11611783288000012,\n",
       "   0.25595029330000013,\n",
       "   0.20421123191250012],\n",
       "  'video_2017-10-25T14_55_12_arena3': [0.22507379720533383,\n",
       "   0.2015798100166662,\n",
       "   0.12443090323333343,\n",
       "   0.2416155741200001,\n",
       "   0.16906194500000057,\n",
       "   0.21971269413333375,\n",
       "   0.2590907566833334,\n",
       "   0.20459558749999968,\n",
       "   0.17276917858333335,\n",
       "   0.07871740562333311,\n",
       "   0.2023914390666667,\n",
       "   0.22470081581666682,\n",
       "   0.2364899662133331,\n",
       "   0.26480832414999994,\n",
       "   0.17111355716666654,\n",
       "   0.21757153983499988,\n",
       "   0.21895105988333374,\n",
       "   0.21294190200666616,\n",
       "   0.09437323821833338,\n",
       "   0.2466124671833329],\n",
       "  'video_2017-10-26T13_35_36_arena2': [0.30887215157999953,\n",
       "   0.33159832396666644,\n",
       "   0.34122624688333386,\n",
       "   0.28770464063333323,\n",
       "   0.3014729594333344,\n",
       "   0.29966623575000023,\n",
       "   0.3176098602666666,\n",
       "   0.3366939243666669,\n",
       "   0.25340012208333385,\n",
       "   0.3249958743,\n",
       "   0.26860475491666574,\n",
       "   0.2199605614500004,\n",
       "   0.2789691751333338,\n",
       "   0.2845469063233337,\n",
       "   0.33482320533333326,\n",
       "   0.17986983048166666,\n",
       "   0.3056243099500003,\n",
       "   0.2796494362166672,\n",
       "   0.30771712531666734,\n",
       "   0.31680313823333367],\n",
       "  'video_2017-10-26T14_43_16_arena3': [0.5519512899833339,\n",
       "   0.37209567943333316,\n",
       "   0.44921254421666673,\n",
       "   0.4512698374000006,\n",
       "   0.5195084711500007,\n",
       "   0.5593606720999998,\n",
       "   0.4839747202733343,\n",
       "   0.475477018516667,\n",
       "   0.4407146793499998,\n",
       "   0.5185095079000012,\n",
       "   0.46877957560000083,\n",
       "   0.4396484605166682,\n",
       "   0.3406581297333338,\n",
       "   0.4203249874999988,\n",
       "   0.3561848722533341,\n",
       "   0.40357912031666704,\n",
       "   0.33968832764999934,\n",
       "   0.4283609202300002,\n",
       "   0.4388717013833344,\n",
       "   0.37976861853333455],\n",
       "  'video_2017-11-03T13_38_06_arena2': [0.6006170421166664,\n",
       "   0.5885119773666662,\n",
       "   0.6059738756833342,\n",
       "   0.49407975926666775,\n",
       "   0.6581279177833342,\n",
       "   0.5382851982666679,\n",
       "   0.5761344631000004,\n",
       "   0.5293371878833331,\n",
       "   0.7216977375166693,\n",
       "   0.6234345175333338,\n",
       "   0.501043618248335,\n",
       "   0.5792828403000012,\n",
       "   0.4162300821166664,\n",
       "   0.4611097233333329,\n",
       "   0.5272758415500004,\n",
       "   0.5090994650333348,\n",
       "   0.5376524781900005,\n",
       "   0.8266302787000005,\n",
       "   0.49338958724999893,\n",
       "   0.7116948562833336],\n",
       "  'video_2017-11-03T13_38_06_arena3': [0.17321682229999955,\n",
       "   0.18753955743333342,\n",
       "   0.09182700098833331,\n",
       "   0.05227393565000012,\n",
       "   0.22279196118333344,\n",
       "   0.13936544168333312,\n",
       "   0.02202134717833337,\n",
       "   0.03821419821000006,\n",
       "   0.12400535478333377,\n",
       "   0.1570885737500001,\n",
       "   0.18835211205000005,\n",
       "   0.16815842338333326,\n",
       "   0.0894257913833335,\n",
       "   0.056931203216666657,\n",
       "   0.01971338559666666,\n",
       "   0.030462513053333317,\n",
       "   0.07532007217166681,\n",
       "   0.03376194984999996,\n",
       "   0.02290781095000002,\n",
       "   0.031210401120000026],\n",
       "  'video_2017-11-03T13_38_06_arena4': [0.2598756141299997,\n",
       "   0.29747441071666614,\n",
       "   0.031478222600000064,\n",
       "   0.04006037418333341,\n",
       "   0.2247842364166662,\n",
       "   0.09971651801166682,\n",
       "   0.11036105016666643,\n",
       "   0.2990689395333329,\n",
       "   0.2357207667166669,\n",
       "   0.1989352224166666,\n",
       "   0.17245648364999974,\n",
       "   0.05731941053999994,\n",
       "   0.16670051148333329,\n",
       "   0.2241163472833336,\n",
       "   0.20561560549999977,\n",
       "   0.2174214111733336,\n",
       "   0.14682525133333355,\n",
       "   0.15557784614999987,\n",
       "   0.22313522769999983,\n",
       "   0.16893792218333312],\n",
       "  'video_2017-11-03T16_20_50_arena3': [0.314073879016667,\n",
       "   0.3254193806166665,\n",
       "   0.27543508424999935,\n",
       "   0.2204351625733335,\n",
       "   0.14824923200333293,\n",
       "   0.1963903982499994,\n",
       "   0.2810662319833336,\n",
       "   0.06049220688333333,\n",
       "   0.3005802617483335,\n",
       "   0.2057975701666668,\n",
       "   0.263907144783333,\n",
       "   0.29267197018333385,\n",
       "   0.2422379028666666,\n",
       "   0.2909777651616662,\n",
       "   0.17659596393333285,\n",
       "   0.27853345356666676,\n",
       "   0.25465070319999983,\n",
       "   0.2620154483666667,\n",
       "   0.221207433933333,\n",
       "   0.18010695665666665]},\n",
       " 'virgin_mated2h': {'video_2017-09-06T15_53_34_arena1': [0.12658740740333335,\n",
       "   0.10172068958499998,\n",
       "   0.07987150741833328,\n",
       "   0.29377685280000043,\n",
       "   0.24817137768333325,\n",
       "   0.2359546417,\n",
       "   0.15503547471666645,\n",
       "   0.25585421301666716,\n",
       "   0.27409760914999953,\n",
       "   0.03370765740000007,\n",
       "   0.2823060655999997,\n",
       "   0.04379670806666667,\n",
       "   0.021447954501666686,\n",
       "   0.17810870241666643,\n",
       "   0.24438523338333334,\n",
       "   0.2869563324999999,\n",
       "   0.2302665114833338,\n",
       "   0.2572260841000001,\n",
       "   0.11401904095000011,\n",
       "   0.194427607333333],\n",
       "  'video_2017-09-07T16_01_26_arena1': [0.1518970433166667,\n",
       "   0.29976248744999956,\n",
       "   0.3444620215000006,\n",
       "   0.15275944638333355,\n",
       "   0.19920712727999987,\n",
       "   0.1158025986166667,\n",
       "   0.18622557196566666,\n",
       "   0.3048777826666667,\n",
       "   0.3037045713333331,\n",
       "   0.08536159431999996,\n",
       "   0.16208936959500014,\n",
       "   0.18676969431666712,\n",
       "   0.15315425419333337,\n",
       "   0.17214242925499976,\n",
       "   0.24633283430000041,\n",
       "   0.22984594334499991,\n",
       "   0.1523570698916674,\n",
       "   0.09557886978333353,\n",
       "   0.1847648326466666,\n",
       "   0.10746256715500017],\n",
       "  'video_2017-09-07T16_01_26_arena2': [0.05238209529750009,\n",
       "   0.04342213861333336,\n",
       "   0.04402785778999995,\n",
       "   0.03158228731666666,\n",
       "   0.034490202133333384,\n",
       "   0.04030446981000006,\n",
       "   0.043520434618333256,\n",
       "   0.032216848249999985,\n",
       "   0.03242408576666666,\n",
       "   0.03179215690000002,\n",
       "   0.013088121283333337,\n",
       "   0.019118270416666677,\n",
       "   0.011602876069999983,\n",
       "   0.004907302033333351,\n",
       "   0.010976735225000001,\n",
       "   0.048986035996666635,\n",
       "   0.024168841366666704,\n",
       "   0.014719767466666709,\n",
       "   0.03510824783333336,\n",
       "   0.04998977758333334],\n",
       "  'video_2017-09-08T15_42_18_arena1': [0.2921054100500002,\n",
       "   0.28493028755000005,\n",
       "   0.1790046311683334,\n",
       "   0.2485366797666663,\n",
       "   0.24558466571666673,\n",
       "   0.025168681683333343,\n",
       "   0.06620516486666668,\n",
       "   0.20772427056666687,\n",
       "   0.21990500236666655,\n",
       "   0.030489198310000135,\n",
       "   0.008336754860000203,\n",
       "   0.0028005268833334114,\n",
       "   0.002811549266666761,\n",
       "   0.006497476566666755,\n",
       "   0.1379109335666665,\n",
       "   0.17778969404666647,\n",
       "   0.022527794566666686,\n",
       "   0.01110093288833339,\n",
       "   0.016764419526666692,\n",
       "   0.016366555450000046],\n",
       "  'video_2017-09-08T15_42_18_arena3': [0.2001895341333332,\n",
       "   0.028806308383333333,\n",
       "   0.3158489832,\n",
       "   0.23360292114999998,\n",
       "   0.2969905039666666,\n",
       "   0.13839436159499988,\n",
       "   0.2012901488499999,\n",
       "   0.26404271440000004,\n",
       "   0.013356464086666716,\n",
       "   0.027676786265000048,\n",
       "   0.02159425922233338,\n",
       "   0.01856428161,\n",
       "   0.014433900466666672,\n",
       "   0.020297246828333323,\n",
       "   0.02632871580666674,\n",
       "   0.010062369300000007,\n",
       "   0.014619679173333351,\n",
       "   0.014110415150000026,\n",
       "   0.03353734172666664,\n",
       "   0.23927421316666664],\n",
       "  'video_2017-09-13T15_40_03_arena4': [0.3348497318166674,\n",
       "   0.36411341676666725,\n",
       "   0.2809368415666656,\n",
       "   0.12517780251666671,\n",
       "   0.2480944923733327,\n",
       "   0.24435824698833325,\n",
       "   0.26607042816666665,\n",
       "   0.26506688564999986,\n",
       "   0.17135176937166668,\n",
       "   0.0762015987866668,\n",
       "   0.23794471826666685,\n",
       "   0.050134229700000116,\n",
       "   0.02058441666666678,\n",
       "   0.04181236853833328,\n",
       "   0.24099215255000012,\n",
       "   0.2145706352166667,\n",
       "   0.2752650930666666,\n",
       "   0.18190773352166625,\n",
       "   0.2626774752666669,\n",
       "   0.29328004722166606],\n",
       "  'video_2017-09-14T15_53_40_arena3': [0.0198314614933334,\n",
       "   0.02008981080333331,\n",
       "   0.11550713276166671,\n",
       "   0.26537307063333293,\n",
       "   0.06815190163333332,\n",
       "   0.09511917341999987,\n",
       "   0.016165241591666723,\n",
       "   0.03535567579166672,\n",
       "   0.24661315913666704,\n",
       "   0.13135516814666687,\n",
       "   0.18926036808333388,\n",
       "   0.17196376081666673,\n",
       "   0.24500280708333314,\n",
       "   0.29414634645,\n",
       "   0.25077601034999986,\n",
       "   0.2577271674166664,\n",
       "   0.21276145253166662,\n",
       "   0.21697273965,\n",
       "   0.04651107119666669,\n",
       "   0.25170629931666666],\n",
       "  'video_2017-09-20T16_07_55_arena4': [0.1929939369666663,\n",
       "   0.12125972559666674,\n",
       "   0.17970173204999984,\n",
       "   0.14783020213333323,\n",
       "   0.20010765408333375,\n",
       "   0.18394694918333337,\n",
       "   0.13951808278333314,\n",
       "   0.1250885237,\n",
       "   0.10712140575,\n",
       "   0.10686002578333319,\n",
       "   0.11925378004999998,\n",
       "   0.08125458983333332,\n",
       "   0.03451863364000006,\n",
       "   0.1832940106999997,\n",
       "   0.11173037195000002,\n",
       "   0.10935618651666665,\n",
       "   0.08229025489999972,\n",
       "   0.09658501161666673,\n",
       "   0.13462779675000008,\n",
       "   0.11371975735000006],\n",
       "  'video_2017-09-21T15_57_23_arena1': [0.2331291158500006,\n",
       "   0.12728299146666677,\n",
       "   0.24312173546666618,\n",
       "   0.17499425748666678,\n",
       "   0.24762032102333312,\n",
       "   0.22840375577000047,\n",
       "   0.07128634041666679,\n",
       "   0.2785955386833334,\n",
       "   0.08029708386166635,\n",
       "   0.30473662895000025,\n",
       "   0.1016857494150001,\n",
       "   0.14991412983333322,\n",
       "   0.2412296721666666,\n",
       "   0.21543167515183345,\n",
       "   0.1429153478666667,\n",
       "   0.2055836215166667,\n",
       "   0.18735132860000034,\n",
       "   0.18050382001666668,\n",
       "   0.15786714952999994,\n",
       "   0.18652405406333347],\n",
       "  'video_2017-09-21T15_57_23_arena4': [0.28231027978333384,\n",
       "   0.14346407671666644,\n",
       "   0.3063344950500001,\n",
       "   0.2514413023999996,\n",
       "   0.18147634416333322,\n",
       "   0.15122333303333343,\n",
       "   0.14857187413333325,\n",
       "   0.20182149418333367,\n",
       "   0.22064293105000007,\n",
       "   0.23937903375000008,\n",
       "   0.14088945853333354,\n",
       "   0.14702083916666672,\n",
       "   0.18352140788333315,\n",
       "   0.10273835548333325,\n",
       "   0.12953210214666694,\n",
       "   0.15277206991666684,\n",
       "   0.06825332623333322,\n",
       "   0.13482335398333353,\n",
       "   0.19911547418333297,\n",
       "   0.1665324740833334],\n",
       "  'video_2017-09-26T16_06_31_arena1': [0.17697631262333335,\n",
       "   0.10252773595333349,\n",
       "   0.30410174730000045,\n",
       "   0.21293346198333304,\n",
       "   0.08960944261666653,\n",
       "   0.10381058305000028,\n",
       "   0.053050106066666776,\n",
       "   0.13271339128833332,\n",
       "   0.235691979616667,\n",
       "   0.26897577959999985,\n",
       "   0.2887451748000002,\n",
       "   0.13314209401666655,\n",
       "   0.23944230681666637,\n",
       "   0.11809375341999995,\n",
       "   0.3111712764666663,\n",
       "   0.2755843306666663,\n",
       "   0.21799426108333322,\n",
       "   0.3262830501833341,\n",
       "   0.23980816975000013,\n",
       "   0.13559392803333345],\n",
       "  'video_2017-09-26T16_06_31_arena3': [0.21042697941666677,\n",
       "   0.1556044925500003,\n",
       "   0.12240382321666683,\n",
       "   0.15195623258333393,\n",
       "   0.12129073525000017,\n",
       "   0.0873131909666666,\n",
       "   0.011530257845000015,\n",
       "   0.07883229188333321,\n",
       "   0.15595734611666676,\n",
       "   0.15798607540000023,\n",
       "   0.10747329638333333,\n",
       "   0.13741581159999994,\n",
       "   0.1204683540833332,\n",
       "   0.13231535904666678,\n",
       "   0.14936571978333335,\n",
       "   0.0756877424166666,\n",
       "   0.08544615933333341,\n",
       "   0.17481392921666672,\n",
       "   0.1305773737333334,\n",
       "   0.055638407006666696],\n",
       "  'video_2017-09-28T15_55_49_arena1': [0.0206322933783335,\n",
       "   0.021780564165000085,\n",
       "   0.07403498391333338,\n",
       "   0.05320209521500013,\n",
       "   0.2902739143700007,\n",
       "   0.0893623212333333,\n",
       "   0.1090754454666666,\n",
       "   0.015901237888333426,\n",
       "   0.20824284195000026,\n",
       "   0.33307453523333397,\n",
       "   0.3089496976000001,\n",
       "   0.024836336216666702,\n",
       "   0.05554451534333348,\n",
       "   0.3640538035500005,\n",
       "   0.19547893553333343,\n",
       "   0.020864790210666787,\n",
       "   0.3832167564166665,\n",
       "   0.3285750056833341,\n",
       "   0.10498789804000026,\n",
       "   0.0769519069433334],\n",
       "  'video_2017-10-11T16_00_50_arena1': [0.1848500941500001,\n",
       "   0.22618480931499974,\n",
       "   0.21678646202666688,\n",
       "   0.24983743891666665,\n",
       "   0.19664189234833326,\n",
       "   0.2568613644499995,\n",
       "   0.20801996743000017,\n",
       "   0.16883925291666688,\n",
       "   0.1743449620466664,\n",
       "   0.1998481258500001,\n",
       "   0.22148049650000023,\n",
       "   0.1963546360899999,\n",
       "   0.13875221886500017,\n",
       "   0.2079629350299999,\n",
       "   0.19461407091666677,\n",
       "   0.23492129714999924,\n",
       "   0.06632107872999983,\n",
       "   0.0987528639500002,\n",
       "   0.2201020916999999,\n",
       "   0.2341282013499997],\n",
       "  'video_2017-10-11T16_00_50_arena2': [0.09972958260333346,\n",
       "   0.183707166933333,\n",
       "   0.02188843453833337,\n",
       "   0.07713278325999999,\n",
       "   0.1338711133433332,\n",
       "   0.1779799241333333,\n",
       "   0.18977742276666681,\n",
       "   0.10646079600333315,\n",
       "   0.167794980616667,\n",
       "   0.14432323928833302,\n",
       "   0.19244616751666688,\n",
       "   0.039468205493333346,\n",
       "   0.22512694888000023,\n",
       "   0.21700611228333344,\n",
       "   0.1674323223433334,\n",
       "   0.17740633871666672,\n",
       "   0.15798175423333347,\n",
       "   0.12280517764999986,\n",
       "   0.198138853385,\n",
       "   0.1553508607499997],\n",
       "  'video_2017-10-11T16_00_50_arena3': [0.3083715839666673,\n",
       "   0.2514606384166662,\n",
       "   0.22703373939999977,\n",
       "   0.1757948876833335,\n",
       "   0.24442105931666672,\n",
       "   0.11995199323333335,\n",
       "   0.3207340470833328,\n",
       "   0.29885417760000005,\n",
       "   0.2611432467333326,\n",
       "   0.2650475873666673,\n",
       "   0.221141562016667,\n",
       "   0.28176728513333343,\n",
       "   0.31852423034999994,\n",
       "   0.18552175118333353,\n",
       "   0.19660706933333325,\n",
       "   0.1877657637999999,\n",
       "   0.24397736779999998,\n",
       "   0.2282494740500002,\n",
       "   0.12694535301666685,\n",
       "   0.22922720476000027],\n",
       "  'video_2017-10-12T15_50_43_arena4': [0.12214288357500003,\n",
       "   0.03586748145166671,\n",
       "   0.3232153178166663,\n",
       "   0.36220046191666627,\n",
       "   0.13497445389500007,\n",
       "   0.3914965985333342,\n",
       "   0.38448901866666624,\n",
       "   0.3314314752500007,\n",
       "   0.2979594712333335,\n",
       "   0.07426188195000007,\n",
       "   0.181951337516667,\n",
       "   0.36459609616666644,\n",
       "   0.31522838115000024,\n",
       "   0.2519421749333333,\n",
       "   0.31900108621666645,\n",
       "   0.2923306180166669,\n",
       "   0.2765045024499998,\n",
       "   0.25929090133999944,\n",
       "   0.269324360433333,\n",
       "   0.2611018124333336],\n",
       "  'video_2017-10-13T16_06_33_arena4': [0.13917070091666653,\n",
       "   0.16465125040000012,\n",
       "   0.3002491670166665,\n",
       "   0.2172549434999996,\n",
       "   0.06284588986833342,\n",
       "   0.01250376402666669,\n",
       "   0.02059225663166667,\n",
       "   0.01526253292666677,\n",
       "   0.02001799639016671,\n",
       "   0.10449215046666681,\n",
       "   0.20386095566666665,\n",
       "   0.07501813021666669,\n",
       "   0.22196739293166648,\n",
       "   0.12958301801,\n",
       "   0.06749806140833346,\n",
       "   0.12774025686666662,\n",
       "   0.14385863023333337,\n",
       "   0.18542807908333322,\n",
       "   0.08671690825000015,\n",
       "   0.1317997409499999],\n",
       "  'video_2017-10-18T16_37_02_arena3': [0.057838162115000015,\n",
       "   0.05601947905999996,\n",
       "   0.04421291343333326,\n",
       "   0.015496949818333364,\n",
       "   0.017361807810000025,\n",
       "   0.03333798583333333,\n",
       "   0.005371329916666691,\n",
       "   0.01665488300000004,\n",
       "   0.011940442666666714,\n",
       "   0.007864735083333371,\n",
       "   0.007057701450000037,\n",
       "   0.012134098350000046,\n",
       "   0.013622481766666746,\n",
       "   0.0259749326166667,\n",
       "   0.01209078970000006,\n",
       "   0.010915505083333405,\n",
       "   0.02150414785499998,\n",
       "   0.016180514083333396,\n",
       "   0.023054787710000035,\n",
       "   0.01762696608833333],\n",
       "  'video_2017-10-18T16_37_02_arena4': [0.07156240219500004,\n",
       "   0.1335777907016667,\n",
       "   0.14633440031666672,\n",
       "   0.22598990591666696,\n",
       "   0.1747063362499999,\n",
       "   0.1421904964999998,\n",
       "   0.053555481036666734,\n",
       "   0.0767022245000001,\n",
       "   0.03474677733666671,\n",
       "   0.0963464725333332,\n",
       "   0.03980942663333335,\n",
       "   0.031977304683333305,\n",
       "   0.021210655483333302,\n",
       "   0.05873513633333333,\n",
       "   0.02527157107333336,\n",
       "   0.05430822340000008,\n",
       "   0.024493687150000023,\n",
       "   0.016179056050000005,\n",
       "   0.009890710810000024,\n",
       "   0.0069734767466666575],\n",
       "  'video_2017-10-19T16_19_37_arena1': [0.16859584191666613,\n",
       "   0.3178541653666668,\n",
       "   0.23774915305000024,\n",
       "   0.2795381841999997,\n",
       "   0.16471745324999978,\n",
       "   0.13886203156166674,\n",
       "   0.21926267373333316,\n",
       "   0.29673103293333364,\n",
       "   0.1873162026500001,\n",
       "   0.08171969238333339,\n",
       "   0.1263641937499999,\n",
       "   0.2293793814000004,\n",
       "   0.11484633018333328,\n",
       "   0.024803435256666666,\n",
       "   0.031219056140000076,\n",
       "   0.14965278498333312,\n",
       "   0.30898794181666683,\n",
       "   0.17299679853333347,\n",
       "   0.20501910292666634,\n",
       "   0.01095095383333345],\n",
       "  'video_2017-10-19T16_19_37_arena4': [0.36118222628333313,\n",
       "   0.268756600391667,\n",
       "   0.28116713195699977,\n",
       "   0.04365501730000002,\n",
       "   0.3537034280999987,\n",
       "   0.36505178578333347,\n",
       "   0.41610681863333404,\n",
       "   0.3756942419666664,\n",
       "   0.3051165304516665,\n",
       "   0.06699026014500013,\n",
       "   0.33098680856666707,\n",
       "   0.30693469164999954,\n",
       "   0.37662160721666676,\n",
       "   0.3571640175666659,\n",
       "   0.33462880914999976,\n",
       "   0.34863401524999976,\n",
       "   0.30332761310000067,\n",
       "   0.10439522501666657,\n",
       "   0.2592604092553332,\n",
       "   0.34101617318333377],\n",
       "  'video_2017-10-25T16_23_26_arena1': [0.05840650097666663,\n",
       "   0.1549244671166666,\n",
       "   0.08717202948333345,\n",
       "   0.13545746144666657,\n",
       "   0.07709731714999986,\n",
       "   0.15009139153333295,\n",
       "   0.11198126438333357,\n",
       "   0.11032423172833324,\n",
       "   0.13033712656666666,\n",
       "   0.0636305858833333,\n",
       "   0.12026213018333347,\n",
       "   0.10927554643333338,\n",
       "   0.061100568383333304,\n",
       "   0.035908484866666694,\n",
       "   0.03161413513499996,\n",
       "   0.10117832760000008,\n",
       "   0.033346409350000036,\n",
       "   0.043709592876166714,\n",
       "   0.013286888556666702,\n",
       "   0.11282960131666672],\n",
       "  'video_2017-10-25T16_23_26_arena3': [0.13927347050500047,\n",
       "   0.18032910931666685,\n",
       "   0.2711795651166659,\n",
       "   0.18069845712500054,\n",
       "   0.062317527533333354,\n",
       "   0.28444602386666634,\n",
       "   0.27250227258333265,\n",
       "   0.12754466712666673,\n",
       "   0.2657838597999998,\n",
       "   0.11099812737666677,\n",
       "   0.012783702266666676,\n",
       "   0.017655517733333362,\n",
       "   0.22107043717666683,\n",
       "   0.04577116494999996,\n",
       "   0.035743376124999955,\n",
       "   0.05731628038333332,\n",
       "   0.027048280515000134,\n",
       "   0.04038703458333325,\n",
       "   0.13998552315000012,\n",
       "   0.16270625841666664],\n",
       "  'video_2017-11-02T16_11_06_arena4': [0.049281354566666706,\n",
       "   0.049491340550000026,\n",
       "   0.014649742636666714,\n",
       "   0.012186337395000033,\n",
       "   0.009517322666666671,\n",
       "   0.003418805200000007,\n",
       "   0.006167543783333382,\n",
       "   0.00470462241666681,\n",
       "   0.007657257428333356,\n",
       "   0.006229915633333352,\n",
       "   0.007409607850000047,\n",
       "   0.007327733500000027,\n",
       "   0.013089852116666714,\n",
       "   0.009913553183333436,\n",
       "   0.013790199278333342,\n",
       "   0.0060033604500000235,\n",
       "   0.009623358478333347,\n",
       "   0.015595891900000023,\n",
       "   0.012830413850000041,\n",
       "   0.02073399199166672],\n",
       "  'video_2017-12-19T15_13_55_arena2': [0.21232687770000006,\n",
       "   0.05139814171666656,\n",
       "   0.015637789749999995,\n",
       "   0.02430755938333336,\n",
       "   0.19024767553333383,\n",
       "   0.10772211656666668,\n",
       "   0.0285999363,\n",
       "   0.051201101494999984,\n",
       "   0.05633602378333332,\n",
       "   0.09711859799500006,\n",
       "   0.1505680014166664,\n",
       "   0.20854003598333345,\n",
       "   0.07653534343333337,\n",
       "   0.029336546450000004,\n",
       "   0.08907427158333336,\n",
       "   0.2186246486166666,\n",
       "   0.16969366101666672,\n",
       "   0.06383042775833353,\n",
       "   0.11483291449999994,\n",
       "   0.13770374184999995],\n",
       "  'video_2017-12-19T15_13_55_arena3': [0.12176173904999993,\n",
       "   0.09681540563333318,\n",
       "   0.16549640359999984,\n",
       "   0.19781520950000023,\n",
       "   0.1397876567400001,\n",
       "   0.05083928106666664,\n",
       "   0.07668935023333331,\n",
       "   0.13469495508833315,\n",
       "   0.15739829373333353,\n",
       "   0.11554866259000005,\n",
       "   0.038249649,\n",
       "   0.040963949533333266,\n",
       "   0.09261566526666694,\n",
       "   0.03589821283333342,\n",
       "   0.09094457205000005,\n",
       "   0.0313439626666667,\n",
       "   0.1466663559216665,\n",
       "   0.09721188039999983,\n",
       "   0.06305861015000003,\n",
       "   0.18291019501666664],\n",
       "  'video_2017-12-19T16_23_33_arena1': [0.23207655519166664,\n",
       "   0.24955969151666688,\n",
       "   0.1921609249683337,\n",
       "   0.19025385981666687,\n",
       "   0.15782921431666677,\n",
       "   0.16819451183999973,\n",
       "   0.12393907343333341,\n",
       "   0.14342866820666708,\n",
       "   0.21819011322500037,\n",
       "   0.055469869183333305,\n",
       "   0.18950788356666623,\n",
       "   0.20422555225000028,\n",
       "   0.13005626661666655,\n",
       "   0.16104937583333337,\n",
       "   0.13358668903333296,\n",
       "   0.18039754571333375,\n",
       "   0.13871787493333299,\n",
       "   0.18152129163333333,\n",
       "   0.05827009875,\n",
       "   0.14417280980333338],\n",
       "  'video_2017-12-19T16_23_33_arena2': [0.17467814941666682,\n",
       "   0.1928340984666668,\n",
       "   0.13260063388000015,\n",
       "   0.02870224779000002,\n",
       "   0.146978653583333,\n",
       "   0.14612689225666672,\n",
       "   0.1687604468666667,\n",
       "   0.1741311924166666,\n",
       "   0.1279685369499999,\n",
       "   0.16835661815000014,\n",
       "   0.19718855096666668,\n",
       "   0.15647355034999996,\n",
       "   0.21627545045000018,\n",
       "   0.16912440701666664,\n",
       "   0.06244758975000011,\n",
       "   0.0070567813000000255,\n",
       "   0.013214602421666699,\n",
       "   0.05830850143333332,\n",
       "   0.17865400146666693,\n",
       "   0.1888792196166665],\n",
       "  'video_2017-12-19T16_23_33_arena3': [0.1945815675999995,\n",
       "   0.021208084550000023,\n",
       "   0.2517779275333332,\n",
       "   0.2586509010166674,\n",
       "   0.1981144721583331,\n",
       "   0.25947192623333337,\n",
       "   0.20097068203333368,\n",
       "   0.03231869488833333,\n",
       "   0.13889696103166677,\n",
       "   0.14560638696666708,\n",
       "   0.13441408646666655,\n",
       "   0.25770487119999963,\n",
       "   0.13024063727833338,\n",
       "   0.18142444806666655,\n",
       "   0.06604358451666667,\n",
       "   0.15514079090000016,\n",
       "   0.19125358236666687,\n",
       "   0.07182732459500009,\n",
       "   0.22302843085000035,\n",
       "   0.1832637803500001],\n",
       "  'video_2017-12-20T15_08_53_arena2': [0.2606778343295002,\n",
       "   0.28931746211666703,\n",
       "   0.2693260849333332,\n",
       "   0.2608509844666668,\n",
       "   0.2685528301766665,\n",
       "   0.20142044580000068,\n",
       "   0.19684221698833376,\n",
       "   0.17190658305000017,\n",
       "   0.2682891150833329,\n",
       "   0.22838389361666683,\n",
       "   0.25495467851666603,\n",
       "   0.2781712874666667,\n",
       "   0.25360350505000046,\n",
       "   0.23443401718333304,\n",
       "   0.2402669018499998,\n",
       "   0.22606531980000016,\n",
       "   0.24956988060000024,\n",
       "   0.2367660340466669,\n",
       "   0.22238121698333346,\n",
       "   0.23259444936666657]}}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bin_size = 20\n",
    "nbins = int(100 / bin_size) + 1\n",
    "bins = np.linspace(0, 100, num=nbins)\n",
    "distance_during_cop_binned_dict = {condition: {os.path.basename(experiment): [] for experiment in experiments[condition]} for condition in condition_order}\n",
    "\n",
    "# Set features to extract from trackfeat files.\n",
    "features = ['vel']\n",
    "\n",
    "for condition in condition_order:\n",
    "    print(condition)\n",
    "    for experiment_path in experiments[condition]:\n",
    "        \n",
    "        control = True if condition == 'virgin_virgin' else False\n",
    "        aggression_df, mating_df, copulation_time, aggression_timepoints = helpers.process_track_data(experiment_path,\n",
    "                                                                                                      include_aggression_only=False,\n",
    "                                                                                                      fly_id=2,\n",
    "                                                                                                      is_control=control,\n",
    "                                                                                                      trackfeat_columns=features,\n",
    "                                                                                                      suppress=True\n",
    "                                                                                                     )\n",
    "        if aggression_df is None or mating_df is None:\n",
    "            continue\n",
    "\n",
    "        experiment = os.path.basename(experiment_path)\n",
    "        print(experiment)\n",
    "\n",
    "        # Slice the aggressive female's data only up until end of copulation - we do not care about\n",
    "        # what happens after that.\n",
    "        copulation_start = copulation_time[0]\n",
    "        copulation_end = copulation_time[1]\n",
    "\n",
    "        distance_during_cop = aggression_df.loc[copulation_start:copulation_end-1, :].copy()\n",
    "        distance_during_cop.fillna(method='ffill', inplace=True)\n",
    "        distance_during_cop = distance_during_cop[distance_during_cop['vel'] < 20]  # Filter out jumps.\n",
    "        distance_during_cop['condition'] = condition\n",
    "        distance_during_cop['experiment'] = experiment\n",
    "        distance_during_cop['has_aggression'] = True if len(aggression_timepoints) > 0 else False\n",
    "\n",
    "        # Calculate distance walked per frame based on the velocity column.\n",
    "        distance_during_cop['dist_walked_meters'] = (distance_during_cop['vel'] / 60) / 1000\n",
    "\n",
    "        # Bin distance over copulation time instead of total distance during copulation.\n",
    "        copulation_duration = len(distance_during_cop)\n",
    "        step_size = np.ceil(copulation_duration / bin_size)\n",
    "        for step in range(int(bin_size)):\n",
    "            start_index = int(step_size*step)\n",
    "            end_index = int(step_size*(step+1))\n",
    "            distance_slice = distance_during_cop.iloc[start_index:end_index, :].copy()\n",
    "            distance_slice_sum = sum(distance_slice['dist_walked_meters'])\n",
    "            distance_during_cop_binned_dict[condition][experiment].append(distance_slice_sum)\n",
    "\n",
    "distance_during_cop_binned_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "      <th>bin_order</th>\n",
       "      <th>distance_walked_meters</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "      <td>bin_1</td>\n",
       "      <td>0.013300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T14_34_55_arena2</td>\n",
       "      <td>bin_1</td>\n",
       "      <td>0.051508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T13_42_13_arena1</td>\n",
       "      <td>bin_1</td>\n",
       "      <td>0.199145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T14_45_32_arena3</td>\n",
       "      <td>bin_1</td>\n",
       "      <td>0.126229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-07T14_37_38_arena3</td>\n",
       "      <td>bin_1</td>\n",
       "      <td>0.206212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>615</th>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-19T15_13_55_arena3</td>\n",
       "      <td>bin_20</td>\n",
       "      <td>0.182910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>616</th>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-19T16_23_33_arena1</td>\n",
       "      <td>bin_20</td>\n",
       "      <td>0.144173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>617</th>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-19T16_23_33_arena2</td>\n",
       "      <td>bin_20</td>\n",
       "      <td>0.188879</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>618</th>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-19T16_23_33_arena3</td>\n",
       "      <td>bin_20</td>\n",
       "      <td>0.183264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>619</th>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>video_2017-12-20T15_08_53_arena2</td>\n",
       "      <td>bin_20</td>\n",
       "      <td>0.232594</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1900 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          condition                        experiment bin_order  \\\n",
       "0     virgin_virgin  video_2017-09-05T13_28_41_arena4     bin_1   \n",
       "1     virgin_virgin  video_2017-09-05T14_34_55_arena2     bin_1   \n",
       "2     virgin_virgin  video_2017-09-06T13_42_13_arena1     bin_1   \n",
       "3     virgin_virgin  video_2017-09-06T14_45_32_arena3     bin_1   \n",
       "4     virgin_virgin  video_2017-09-07T14_37_38_arena3     bin_1   \n",
       "..              ...                               ...       ...   \n",
       "615  virgin_mated2h  video_2017-12-19T15_13_55_arena3    bin_20   \n",
       "616  virgin_mated2h  video_2017-12-19T16_23_33_arena1    bin_20   \n",
       "617  virgin_mated2h  video_2017-12-19T16_23_33_arena2    bin_20   \n",
       "618  virgin_mated2h  video_2017-12-19T16_23_33_arena3    bin_20   \n",
       "619  virgin_mated2h  video_2017-12-20T15_08_53_arena2    bin_20   \n",
       "\n",
       "     distance_walked_meters  \n",
       "0                  0.013300  \n",
       "1                  0.051508  \n",
       "2                  0.199145  \n",
       "3                  0.126229  \n",
       "4                  0.206212  \n",
       "..                      ...  \n",
       "615                0.182910  \n",
       "616                0.144173  \n",
       "617                0.188879  \n",
       "618                0.183264  \n",
       "619                0.232594  \n",
       "\n",
       "[1900 rows x 4 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "binned_distance_df = pd.DataFrame()\n",
    "for condition in condition_order:\n",
    "    temp_df = pd.DataFrame.from_dict(distance_during_cop_binned_dict[condition], orient='index')\n",
    "    temp_df.columns = ['bin_' + str(n+1) for n in range(bin_size)]\n",
    "    temp_df['condition'] = condition\n",
    "    temp_df.reset_index(inplace=True)\n",
    "    temp_df.rename(columns={'index': 'experiment'}, inplace=True)\n",
    "    temp_df = temp_df.melt(id_vars=['condition', 'experiment'],\n",
    "                           value_vars=['bin_' + str(n+1) for n in range(bin_size)],\n",
    "                           var_name='bin_order',\n",
    "                           value_name='distance_walked_meters'\n",
    "                          )\n",
    "    binned_distance_df = pd.concat([binned_distance_df, temp_df])\n",
    "    \n",
    "binned_distance_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "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usXr0a586dU27LyspCUVERAgICIBAIIJVKkZSUhOLiYqxevRpjxozB6dOnUVlZqexkfFbNcYSQalOnTkVhYSFu3LjR5GM//vhjbNq0STnAgrR9w4cPx5YtWwBUjyxszel72sRosS5dumD//v344IMP8PDhQxgYGMDMzAzbt2+Ht7c36XYigwAAAKlJREFUJk+ejAEDBuDXX3/F6NGj4ePjA319fQQEBMDPzw/Jycn1Tq5Wc1zNE8yk/Wqt4ZPa4ODBg8067ukhyaT1DRo0qM4ovc8++wxGRkYNHrNp0yZERETA19cXzs7OCA4OVneYSjzGnpkakxBCCGmhNtEsRgghpGOh5EIIIYRzlFwIIYRwjpILIYQQzlFyIYQQwjlKLoQQQjhHyYUQQgjnKLkQQgjh3P8DMIab5Tx5CCQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Set bin edges based on desired bin size.\n",
    "percentage = 20\n",
    "nbins = int(100 / percentage) + 1\n",
    "bins = np.linspace(0, 100, num=nbins)\n",
    "\n",
    "# Plot histogram for each condition.\n",
    "for condition in condition_order[:1]:\n",
    "\n",
    "    # Initialize figure.\n",
    "    figure, axis = plt.subplots()\n",
    "    \n",
    "    # Draw the pointplot.\n",
    "    sns.pointplot(x='bin_order',\n",
    "                  y='distance_walked_meters',\n",
    "                  data=binned_distance_df.query('condition==\"' + condition + '\"'),\n",
    "                  ci=95,\n",
    "                  nboot=1000,\n",
    "                  color='steelblue'\n",
    "                 )\n",
    "\n",
    "    # Figure and axes formatting.\n",
    "    axis.set_xlabel('Copulation Time (%)', labelpad=-15)\n",
    "    axis.set_xlim(-0.5, 20)\n",
    "    axis.set_xticks([i-0.5 for i in range(0, 21, 4)])\n",
    "    xticklabels = [(i)*20 for i in range(21)]\n",
    "    xticklabels[0] = '0\\nCopulation\\nStart'\n",
    "    xticklabels[5] = '100\\nCopulation\\nEnd'\n",
    "    axis.set_xticklabels(xticklabels)\n",
    "    axis.tick_params(axis='x', length=5)\n",
    "    axis.set_ylabel('Distance (cm.)')\n",
    "    axis.set_ylim(0, 0.3)\n",
    "    axis.set_yticklabels([int(label*100) for label in axis.get_yticks()])\n",
    "\n",
    "    # Saving parameters.\n",
    "    filename = 'distance_walked_during_copulation_binned_' + condition\n",
    "    plt.savefig(os.path.join(savepath, filename))\n",
    "\n",
    "    plt.show()\n",
    "    plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
